Comment 11 for bug 669496

Revision history for this message
Scott Moser (smoser) wrote : Re: natty kernel fails to mount root on ec2

Stefan, I tried working this the other way around. Rather than trying natty kernel with maverick user space, I tried maverick kernel with natty user space.

$ ec2-un-instances --region us-east-1 --instance-type m1.small ami-2c28df45
# us-east-1 ami-2c28df45 canonical ebs/ubuntu-natty-daily-i386-server-2010111
$ NATTY_IID=i-aeee8cc3
$ NATTY_VOL=vol-a910fbc1

$ ec2-run-instances --region us-east-1 --instance-type t1.micro --availability-zone us-east-1b ami-aa00f7c3
$ MAVERICK_IID=i-e6ed8f8b

The natty instance failed to boot (actually with no kernel console messages, only grub).

$ ec2-stop-instances ${NATTY_IID}
$ ec2-detach-volume ${NATTY_VOL}
$ ec2-attach-volume ${NATTY_VOL} --instance ${MAVERICK_IID} --device /dev/sdh

then, on the maverick instance

% sudo mount /dev/sdh /mnt
% sudo mount --bind /dev /mnt/dev
% sudo mount --bind /proc /mnt/proc
% sudo mount --bind /sys /mnt/sys
% kdeb=https://launchpad.net/ubuntu/+archive/primary/+files/linux-image-2.6.35-22-virtual_2.6.35-22.35_i386.deb
% ( cd /mnt/tmp && wget ${kdeb} )
% sudo chroot /mnt
[chroot]% dpkg -i /tmp/*.deb
[chroot]% exit
% mnulst=/mnt/boot/grub/menu.lst
% sudo cp ${mnulst} ${mnulst}.dist
% sudo sed -i 's,^default\(.*\)0$,default\12,' ${mnulst}
% diff -u ${mnulst}.dist ${mnulst}
-default 0
+default 2
% for m in proc sys dev; do sudo umount /mnt/$m; done
% sudo umount /mnt

Then,
$ ec2-detach-volume ${NATTY_VOL}
$ ec2-attach-volume ${NATTY_VOL} --instance ${NATTY_IID} /dev/sda
$ ec2-start-instances ${NATTY_IID}

Now, the natty user space booted fine with the maverick kernel.
ssh in:
% uname -r
2.6.35-22-virtual
% lsb_release -c
Codename: natty

The above was done on m1.small (i386) i can try other sizes as well.