flash007
April 1st, 2011, 03:58 PM
I'm trying to "upgrade" from ubuntu 9.04 to ubuntu 10.04.2 via a clonezilla (using a maverick usb clonezilla software with it's vmlinuz and initrd.img). but this clonezilla is not from a bootable usb flash drive, usb drive or CD, it's from the hard drive.
Here's what I have:
1) one 500gig drive with a primary partition under LVM. this partition has a 490gig root partition (ubuntu-root) and a 10 gig swap partition (ubuntu-swap_1). It has an extended partition (/dev/sda2) that's not under LVM consisting of one logical drive (/dev/sda5) that is the /boot partition.
2) I've upgraded the grub to grub2 (version 1.96) which has better features
3) I've deleted the swap and reconfigured this partition with a name of (livehd) and it has an ext3 filesystem. I've copied the clonezilla software to this partition which also has the ubuntu 10.04.2 image that I want to restore to the root partition
4) I've modified the existing grub2 using the 40-custom file so that the grub menu has the "Clonezilla Ubuntu 10.04.2 upgrade" entry in it.
5) the initrd.img from clonezilla has LVM support since I opened up the image to a directory using "gzip -d -c /boot/initrd.img|cpio -i" to check it
6) grub2 sees the (ubuntu-root), (ubuntu-livehd), (hd0,1), (hd0), and (hd0,5) devices and can list (ls) their directories
Here's what I want:
1) to make the new LVM "livehd" partition bootable
2) to use grub2 to some how chainload up and then use the "bootable" partition to boot clonezilla software to "restore" the new 10.04.2 image to the root partition and ultimately do this in a batch process
Here's what I get:
errors not finding the root partition. this is I believe after it loads the initial ramdisk (initrd) and loads the initial kernel (vmlinuz) and then it tries to load the read only copy of a root file system (kind of like a mini root). Can any one clever enough help me out here?
here is the data:
# fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000d1b70
Device Boot Start End Blocks Id System
/dev/sda1 * 1 60756 488022538+ 8e Linux LVM
/dev/sda2 60757 60786 240975 5 Extended
/dev/sda5 60757 60786 240943+ 83 Linux
# parted -l
Model: ATA ST3500514NS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 500GB 500GB primary boot, lvm
2 500GB 500GB 247MB extended
5 500GB 500GB 247MB logical ext2
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/ubuntu-livehd: 10.1GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 10.1GB 10.1GB ext3
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/ubuntu-root: 490GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 490GB 490GB ext3
# lvdisplay -v
--- Logical volume ---
LV Name /dev/ubuntu/root
VG Name ubuntu
LV UUID 8qMa59-KvmF-noql-NrMf-XWyE-Sl54-rxty8s
LV Write Access read/write
LV Status available
# open 1
LV Size 456.01 GB
Current LE 116738
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0
--- Logical volume ---
LV Name /dev/ubuntu/livehd
VG Name ubuntu
LV UUID b0I5oh-LO9g-2AC1-A1tE-63n5-qfCT-TPUmQb
LV Write Access read/write
LV Status available
# open 1
LV Size 9.37 GB
Current LE 2398
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:1
# dpkg --get-selections |grep grub
grub deinstall
grub-common install
grub-pc install
grub2 install
# aptitude show grub2
Package: grub2
State: installed
Automatically installed: no
Version: 1.96+20080724-12ubuntu2.1
Priority: extra
Section: universe/admin
Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Uncompressed Size: 102k
Depends: debconf (>= 0.5) | debconf-2.0, grub-pc
Description: GRand Unified Bootloader, version 2 (dummy package)
This is a dummy transitional package to handle GRUB 2 upgrades. It can be
safely removed.
Homepage: http://www.gnu.org/software/grub/grub-2.en.html
# cat /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# This file is an example on how to add custom entries
menuentry "My Clonezilla, Ubuntu 10.04.2" {
set root=UUID=00df4d70-d48e-49f7-a310-9d7955126276
chainloader +1
linux /live/vmlinuz subdir=live root=UUID=00df4d70-d48e-49f7-a310-9d7955126276 ro quiet splash
initrd /live/initrd.img
}
And when the splash page (grub menu) comes up, I just type "c" to command line and do the following
for a manual boot:
grub> ls
(ubuntu-livehd) (ubuntu-root) (hd0) (hd0,1) (hd0,5)
grub> set root=(hd0,1)
grub> linux (ubuntu-livehd)/live/vmlinuz ro
[Linux-bzImage, setup=0x3400, size=0x415210]
grub> initrd (ubuntu-livehd)/live/initrd.img
grub> boot
errors:
mount: cannot read /etc/fstab: No such file or directory
mount: mounting /dev on /root/dev failed: No such file or diretory
mount: monting /sys on /root/sys fialed: No such file or directory
mount: mounting /proc on /root/proc failed: No such file or directory
target filesystem doesn't have requested /sbin/init
no init found. Try passing init=bootarg
/bin/sh: can't access tty; job control turned off
(initramfs)_
Here's what I have:
1) one 500gig drive with a primary partition under LVM. this partition has a 490gig root partition (ubuntu-root) and a 10 gig swap partition (ubuntu-swap_1). It has an extended partition (/dev/sda2) that's not under LVM consisting of one logical drive (/dev/sda5) that is the /boot partition.
2) I've upgraded the grub to grub2 (version 1.96) which has better features
3) I've deleted the swap and reconfigured this partition with a name of (livehd) and it has an ext3 filesystem. I've copied the clonezilla software to this partition which also has the ubuntu 10.04.2 image that I want to restore to the root partition
4) I've modified the existing grub2 using the 40-custom file so that the grub menu has the "Clonezilla Ubuntu 10.04.2 upgrade" entry in it.
5) the initrd.img from clonezilla has LVM support since I opened up the image to a directory using "gzip -d -c /boot/initrd.img|cpio -i" to check it
6) grub2 sees the (ubuntu-root), (ubuntu-livehd), (hd0,1), (hd0), and (hd0,5) devices and can list (ls) their directories
Here's what I want:
1) to make the new LVM "livehd" partition bootable
2) to use grub2 to some how chainload up and then use the "bootable" partition to boot clonezilla software to "restore" the new 10.04.2 image to the root partition and ultimately do this in a batch process
Here's what I get:
errors not finding the root partition. this is I believe after it loads the initial ramdisk (initrd) and loads the initial kernel (vmlinuz) and then it tries to load the read only copy of a root file system (kind of like a mini root). Can any one clever enough help me out here?
here is the data:
# fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000d1b70
Device Boot Start End Blocks Id System
/dev/sda1 * 1 60756 488022538+ 8e Linux LVM
/dev/sda2 60757 60786 240975 5 Extended
/dev/sda5 60757 60786 240943+ 83 Linux
# parted -l
Model: ATA ST3500514NS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 500GB 500GB primary boot, lvm
2 500GB 500GB 247MB extended
5 500GB 500GB 247MB logical ext2
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/ubuntu-livehd: 10.1GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 10.1GB 10.1GB ext3
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/ubuntu-root: 490GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 490GB 490GB ext3
# lvdisplay -v
--- Logical volume ---
LV Name /dev/ubuntu/root
VG Name ubuntu
LV UUID 8qMa59-KvmF-noql-NrMf-XWyE-Sl54-rxty8s
LV Write Access read/write
LV Status available
# open 1
LV Size 456.01 GB
Current LE 116738
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0
--- Logical volume ---
LV Name /dev/ubuntu/livehd
VG Name ubuntu
LV UUID b0I5oh-LO9g-2AC1-A1tE-63n5-qfCT-TPUmQb
LV Write Access read/write
LV Status available
# open 1
LV Size 9.37 GB
Current LE 2398
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:1
# dpkg --get-selections |grep grub
grub deinstall
grub-common install
grub-pc install
grub2 install
# aptitude show grub2
Package: grub2
State: installed
Automatically installed: no
Version: 1.96+20080724-12ubuntu2.1
Priority: extra
Section: universe/admin
Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Uncompressed Size: 102k
Depends: debconf (>= 0.5) | debconf-2.0, grub-pc
Description: GRand Unified Bootloader, version 2 (dummy package)
This is a dummy transitional package to handle GRUB 2 upgrades. It can be
safely removed.
Homepage: http://www.gnu.org/software/grub/grub-2.en.html
# cat /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# This file is an example on how to add custom entries
menuentry "My Clonezilla, Ubuntu 10.04.2" {
set root=UUID=00df4d70-d48e-49f7-a310-9d7955126276
chainloader +1
linux /live/vmlinuz subdir=live root=UUID=00df4d70-d48e-49f7-a310-9d7955126276 ro quiet splash
initrd /live/initrd.img
}
And when the splash page (grub menu) comes up, I just type "c" to command line and do the following
for a manual boot:
grub> ls
(ubuntu-livehd) (ubuntu-root) (hd0) (hd0,1) (hd0,5)
grub> set root=(hd0,1)
grub> linux (ubuntu-livehd)/live/vmlinuz ro
[Linux-bzImage, setup=0x3400, size=0x415210]
grub> initrd (ubuntu-livehd)/live/initrd.img
grub> boot
errors:
mount: cannot read /etc/fstab: No such file or directory
mount: mounting /dev on /root/dev failed: No such file or diretory
mount: monting /sys on /root/sys fialed: No such file or directory
mount: mounting /proc on /root/proc failed: No such file or directory
target filesystem doesn't have requested /sbin/init
no init found. Try passing init=bootarg
/bin/sh: can't access tty; job control turned off
(initramfs)_