Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Cloning and deployin double boot configuration for labs

  1. #1
    Join Date
    Feb 2008
    Beans
    3

    Cloning and deployin double boot configuration for labs

    Hello, i am trying to promote Ubuntu in the computer labs of the university where i work.

    I work with Ghost. I make a good configuration and then deploy it in all machines. So in the new version of the Image i include an Ubuntu 7.10 installation that works flawlessly in the prototype machine.

    When i use Ghost 2003 to clone it and deploy it via DVD or disk to disk to other machines, the GRUB loads fine, the Windows XP boot is fine but Ubuntu doesn't boot.

    In normal mode, it stops in the Ubuntu loading screen and once i see the console i get :

    Starting up...
    Loading, please wait...

    Check root = bootarg cat /proc/cmdline
    or missing modules, device : cat /proc/modules is /dev
    ALERT! /dev/disk/by-uuid/fb09cb39-ccf3-41f... does not exist. Dropping to shell!

    Busybox v1.1.3 ...

    (initramfs)
    What can i do ? Can i do something before cloning the prototype so that it doesn't happen ? It seems like the OS is searching for the old hardware of the hard disk and is linked to its hardware id.

    If you cannot help, can you give me an easy alternative how can i clone this dual boot system to 30 PCs via DVD and network ?

  2. #2

    Re: Cloning and deployin double boot configuration for labs

    I don't have much experience with this (only just moved over to Hardy) but indeed it seems that something is looking up disks by uuid. I'm sure it used to be by /dev/hd* name though - for your purposes it's probably best to revert to that.

    If you look at the original system, how is the boot device specified in /boot/grub/menu.lst? The other file to check is /etc/fstab. I *think* that's all...

  3. #3
    Join Date
    Feb 2008
    Beans
    3

    Re: Cloning and deployin double boot configuration for labs

    Anyone else ? Any alternative for cloning my prototype machine to the other pcs in the lab ?

    Somebody in here must be a computer lab admin who has double boot in the pcs of the lab.

    We need to clone a double boot machine to other machines with the same configuration. How can we do this insted of Ghosting them ?

  4. #4

    Re: Cloning and deployin double boot configuration for labs

    Quote Originally Posted by mmingos View Post
    Anyone else ?
    No, really just those two files, I think

    Actually you can do a system-wide search for that uuid using a combination of grep and find (see their man pages) if you want to be really sure you're not missing anything.

  5. #5
    Aearenda's Avatar
    Aearenda is offline Iced Almond Soy Ubuntu, No Foam
    Join Date
    Apr 2006
    Location
    Melbourne, Australia
    Beans
    1,109
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Cloning and deployin double boot configuration for labs

    It sounds to me as though the Ghost process is changing the UUID for the partitions. I don't use Ghost, so I may be wrong. In other words, patsoe is right.

    Assuming I'm right, here is what I would do to fix it (please read to the end first - there's an experiment you can do to see if I am right at the end, which draws on some of the explanation given further up).

    The UUID is a unique identifier for the partition; using it means that the partition can be shifted physically from disk to disk and it will still work. Unfortunately, it also means the boot will fail if it cannot be found. So you need to replace the UUID entries in GRUB's config with partition names that will not change when the machine is cloned.

    On your master machine, if you run
    Code:
    cat /etc/fstab
    you should see a list of the UUIDs and a commented line above each one showing the equivalent device name /dev/sdxy - something like this:
    Code:
    # /dev/sda5
    UUID=8a4a255a-c61f-452b-ad60-927b8c48ba70 / ext3 noatime,nodiratime,errors=remount-ro 0 1
    Here my root partition is identified by UUID and /dev/sda5 is the device name.

    On your master machine, you should make a copy of /etc/fstab for later reference and then edit /etc/fstab so that the UUID part is replaced by the /dev/sdxy name - so my entry from above would now be:
    Code:
    # /dev/sda5
    /dev/sda5 / ext3 noatime,nodiratime,errors=remount-ro 0 1
    Don't worry about exact layout, a space is as good as a tab. The device name for the partition may be hdxy instead of sdxy.
    Do this for each partition that is identified by UUID.

    Next, make a backup copy of /boot/grub/menu.lst, and then edit the original file looking for an entry like this:
    Code:
    # kopt=root=UUID=8a4a255a-c61f-452b-ad60-927b8c48ba70 ro
    Change this to the appropriate /dev/sdxy for the UUID as shown in the copy you made earlier of /etc/fstab, like this:
    Code:
    # kopt=/dev/sda5 ro
    Note that the '#' at the start of the line is important and must be there.

    Further down the file, you will find at least two lines like this, but with different final options:
    Code:
    kernel		/boot/vmlinuz-2.6.24-16-generic root=UUID=8a4a255a-c61f-452b-ad60-927b8c48ba70 ro quiet splash
    You can either fix all the lines like this by saving the file now and then using update-grub, which will take the change you just made and fix all the relevant entries, or fix each line manually in the editor (which is what I do, since I have the device name in the clipboard by this time):
    Code:
    kernel		/boot/vmlinuz-2.6.24-16-generic root=/dev/sda5 ro quiet splash
    Repeat for each line with a UUID, replacing with the correct device name, and save the file.

    I think that's it. Reboot the master to make sure it works correctly, then clone it and test.

    Note that you can also do an experiment before you start all this, to avoid wasting time if my guess is wrong - on an already CLONED machine, when it starts up,
    1. Press ESC if necessary to enter the GRUB menu
    2. Move the cursor down to the 'recovery mode' entry and press 'e'.
    3. It will show you the relevant lines; move down to the kernel line and press 'e' again.
    4. It will allow you to use the cursor keys to replace the UUID=xxxx... with the /dev/sdxy syntax discovered from /etc/fstab on the master. Press <Enter> when done.
    5. Press 'b' to boot off the modified entry.
    6. The clone should then start, but will stop again later complaining about the UUID in /etc/fstab on the clone. You may be able to get to a shell and edit that file too at this point; but it doesn't really matter since you will have proved that it is the UUID if you do get further than before, and you should really just go and modify the master.

    I hope this helps! Please let us know how you get on.
    BTW, have you tried Clonezilla?
    Last edited by Aearenda; April 25th, 2008 at 12:12 PM. Reason: Added Clonezilla

  6. #6

    Re: Cloning and deployin double boot configuration for labs

    Hi Aearenda, thanks for explaining uuids: I obviously completely misunderstood those. But now that (I think) I understand, I don't understand why you couldn't clone those along with the rest of the partition contents?

    Wouldn't replacing Ghost by something else be a better solution then than my thought of replacing the uuid references?
    Last edited by Patsoe; April 25th, 2008 at 12:22 PM. Reason: afwul grammar error

  7. #7
    Aearenda's Avatar
    Aearenda is offline Iced Almond Soy Ubuntu, No Foam
    Join Date
    Apr 2006
    Location
    Melbourne, Australia
    Beans
    1,109
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Cloning and deployin double boot configuration for labs

    Well yes, I do think the UUID should be kept unchanged during the clone process, and there are other tools that would preserve it, but maybe Ghost changes it for a reason - such as, on a Windows XP system, this would probably trigger reactivation along with a MAC address change on the network card, so there is a commercial reason for MS to want Ghost to do it. ** But this is just speculation on my part - I haven't experimented with Ghost **. I don't know where the UUID is actually stored. However, the whole point of a UUID is that it is a unique ID - so cloning it actually makes it not unique, and so maybe Ghost is doing it right!

    Actually with hindsight I'm not sure we are right - if it was the GRUB UUID entry that was wrong, I don't think it would get as far as it does. Maybe there is a resume parameter on the kernel line too. Or maybe it is actually the fstab one that it fails at.

    I think it is sensible to persist with Ghost in this case since it is a familiar tool already in use in this lab, and presumably paid for. No reason to change unless what we have come across is a bug.
    Last edited by Aearenda; April 25th, 2008 at 12:45 PM. Reason: Added last bit about not changing Ghost.

  8. #8
    Join Date
    May 2005
    Location
    indonesia
    Beans
    149
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Cloning and deployin double boot configuration for labs

    Was that the norton ghost? click here and there.. you can clone just by booting to any live cd and type dd if=/dev/hda of=/dev/hdb (or /dev/sda and sdb) in terminal.
    99.9 % works (I clone at least a hundred disk).
    Last edited by BatsotO; April 25th, 2008 at 01:02 PM.

  9. #9
    Aearenda's Avatar
    Aearenda is offline Iced Almond Soy Ubuntu, No Foam
    Join Date
    Apr 2006
    Location
    Melbourne, Australia
    Beans
    1,109
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Cloning and deployin double boot configuration for labs

    I use dd too sometimes - but only on small partitions! It copies empty space. I use partimage on bigger ones, in conjunction with clonezilla and PXE booting workstations - no need for a live CD or typing commands.

  10. #10
    Join Date
    May 2005
    Location
    indonesia
    Beans
    149
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Cloning and deployin double boot configuration for labs

    Quote Originally Posted by Aearenda View Post
    I use dd too sometimes - but only on small partitions! It copies empty space. I use partimage on bigger ones, in conjunction with clonezilla and PXE booting workstations - no need for a live CD or typing commands.
    I clone the whole 80 gigs disk in about 45 minutes. but to be honest I never use it on dual boot disk. I'm 100% linux and a very patient man.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •