how to copy cubic project to another computer

Asked by ibrahim bondokji

i want to copy the whole folder containing custom-disk folder and the custom-root folder, but it is complaining about not being able to copy some special files.

i need this because i want to continue customizing the image on a different computer.

also the computer i want to continue customizing the image on does not have the same kernel of the pc the project was created on. should i be concerned about that?

thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Cubic Edit question
Assignee:
No assignee Edit question
Solved by:
ibrahim bondokji
Solved:
Last query:
Last reply:
Revision history for this message
Cubic PPA (cubic-wizard) said :
#1

[1]

You should copy the entire Cubic project directory to the target computer in order to continue customizing your project on the other machine.

This is the *directory* that contains all three files/directories:
    cubic.conf
    custom-disk
    custom-root

[2]

Assuming:

    1. Your Cubic project directory is "my_cubic_project"
    2. Your user id on the target computer is "ibrahimbond"
    3. Your target computer is is named "TARGET_PC"

(Replace these as necessary in the commands below).

Also, you may want to delete my_cubic_project/*.iso and *.md5 to make the transfer go faster, since you can always generate a new ISO.

(a)

On your original computer:

    $ cd <parent directory of my_cubic_project>
    $ sudo tar -cvpzf my_cubic_project.tar.gz my_cubic_project
    $ rcp -pr my_cubic_project.tar.gz ibrahimbond@TARGET_PC.local:/home/ibrahimbond/

(b)

On your target computer:

    Login as ibrahimbond.

    $ cd ~/
    $ sudo tar xvfz my_cubic_project.tar.gz

Revision history for this message
Cubic PPA (cubic-wizard) said :
#2

The target computer's kernel shouldn't matter.

Revision history for this message
Cubic PPA (cubic-wizard) said :
#3

* Note: the `rcp` command in step (a) can be simpler (the `-pr` is not needed):

    $ rcp my_cubic_project.tar.gz ibrahimbond@TARGET_PC.local:/home/ibrahimbond/

Revision history for this message
ibrahim bondokji (ibrahimbond) said :
#4

moving the project to the target pc worked fine.

i only needed to modify the original disk image to the location in the target pc then it goes through the "copying files and extracting the compressed linux file system" step again, but it does it really quick since all files are supposedly extracted. if i did not perform this it would complain in the "Analyzing customization and preparing options" step at Identify ISO boot kernels with the following error: No valid ISO boot kernels were found. to correct this issue, click the back button and install missing linux kernel packages on the terminal page, or select the original ISO in the project page.

now upon trying to install the custom image created from the target pc, instead of showing the installation wizard, installation enters emergency mode leaving me on a black terminal and if i try to execute any sudo command it says " sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set"

Revision history for this message
Cubic PPA (cubic-wizard) said :
#5

The purpose of tar-ing the original directory was to preserve the original permissions.

However, it looks like some permissions change (either when the original directory is compressed, or when it is extracted).

I'll have to examine what is happening in each of these steps in detail to figure out what is going on.

It may take some time; I'll get back to you when I have more info.

Revision history for this message
ibrahim bondokji (ibrahimbond) said :
#6

so far i have tested three things.

1- changed original image path. which reloads custom-disk folder in the cubic project.

2- did not give the new original image path, but installed the kernel from within chroot.

both above steps causes the installation to go into emergency and i cant continue the installation

3- i took a fully created custom image from the previous pc and loaded in cubic. this step carried me through the installation, but the installation seems not right. and i also get this error when i use sudo: " sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set"

Revision history for this message
saini (theindian) said :
#7

Ibrahim bondokji , Just copy your generated iso image (cubic image) to your new pc. Restart your customization with cubic using this image. It will be available from you lastly customization.

Revision history for this message
ibrahim bondokji (ibrahimbond) said :
#8

if you look at my last comment, i have said that i have tried this in number 3. it went through the installation, but there was something wrong with the ownership of the root.

Revision history for this message
saini (theindian) said :
#9

I have done this thing with my own project. It worked for me very well. So, that is why i am suggesting you.
But i think your case is somewhat different from mine. :)

Revision history for this message
Manfred Hampl (m-hampl) said :
#10

For diagnostic purposes, what is the output of the command

ls -l /usr/bin/sudo

Revision history for this message
Cubic PPA (cubic-wizard) said :
#11

ibrahim,

Saini's suggestion in comment #9 is good and should have worked for you.

Also, please share the output as requested by Manfred in comment #10.

In comment #4, you mentioned that you encountered a "No valid ISO boot kernels were found."

You resolved this by pointing Cubic to a valid *.iso on your target PC. Another way to address the problem would have been to install valid kernel files in your custom OS. What I mean by this is, if you look at the contents /boot, you will notice that vmlinuz and initrd are broken sym links. Look at this question to see how to resolve this issue: https://answers.launchpad.net/cubic/+question/688169

It is surprising that the steps I recommended in comment #1 are not working for you...

    On your source computer:
        $ cd <parent directory of my_cubic_project>
        $ sudo tar -cvpzf my_cubic_project.tar.gz my_cubic_project
        $ rcp my_cubic_project.tar.gz ibrahimbond@TARGET_PC.local:/home/ibrahimbond/
    On your target computer:
        $ sudo tar xvfz my_cubic_project.tar.gz

I just tried copying Cubic files from one computer to another using the above commands. I checked file ownership and permissions after copying and extracting the files, and they matched exactly.

Are you sure you used `sudo` exactly as in the above commands ?

Do you have a different kind of file-system on your target computer, such as NTFS, or something else?

Revision history for this message
ibrahim bondokji (ibrahimbond) said :
#12

previously i was extracting with right clicking and choosing "extract here" option. i retried using "sudo tar xvfz my_cubic_project.tar.gz" and i got passed the whole installation process, but there is still an issue with the sudo ownership.

 ls -l /usr/bin/sudo yielded "-rwsr-xrw 1 root root"

but i have tried to create new cubic project from the generated image on the previous computer and it seems to work fine!

thank you all for your responses.