Boot Ubuntu 12.04 with grub and /boot partition
I'am trying to run Ubuntu 12.04 (32bits) with a root partition encrypted.
I asumed that this is possible within Linode, and I followed
The plan is to boot using grub and mount the root partition then. A passphrase will be asked during the boot to mount the root
As a previous step I set up a box with:
separate /boot partition (in /dev/xvda ext3)
swap partition (in /dev/xvdb)
Ubuntu 12.04 root partition (in /dev/xvdc ext3)
fstab is modified to reflect teh partitions
# <file system=""><mount point=""><type><options><dump><pass>proc /proc proc defaults 0 0
/dev/xvda /boot ext3 defaults 0 0
/dev/xvdc / ext3 noatime,errors=remount-ro 0 1
/dev/xvdb none swap sw 0 0</pass></dump></options></type></mount></file>
The system is booting if the profile selected is
Kernel 'Latest 3.4(3.4.2-linodeXX)' ,
root device : Standard /dev/xvdc, i
nitrd – No initrd --
Xenify Distro
The next step is to boot using grub
I followed Linode guide (
As the guide suggest, I modified /boot/grub/menu.lst and update-grub
getting at the bottom of the file
title Ubuntu 12.04 LTS, kernel 3.2.0-26-virtual
root (hd0)
kernel /vmlinuz-3.2.0-26-virtual root=/dev/xvda console=hvc0 ro quiet quiet splash
initrd /initrd.img-3.2.0-26-virtual
title Ubuntu 12.04 LTS, kernel 3.2.0-26-virtual (recovery mode)
root (hd0)
kernel /vmlinuz-3.2.0-26-virtual root=/dev/xvda console=hvc0 ro quiet single
initrd /initrd.img-3.2.0-26-virtual
Then, I created a configuration profile with:
Kernel: pv-grub-x86_32
Block assignements: /dev/xvda –> /boot , /dev/xvdb --> swap and /dev/xvdc --> 12.04 LTS Disk image (what should be my root)
initrd --> --No Initrd--
root device --> standard /dev/xvda (this is the block where my boot is,no?)
Xenify Distro --> NO
Booting with this configuration does not succeed and it gets stuck in the grubdom menu:
Showing last 100 lines from current boot
-----------------------------------------
Xen Minimal OS!
start_info: 0x9e8000
nr_pages: 131072 shared_inf: beb6b000
pt_base: 0x9eb000 mod_start: 0x0
mod_len: 0
flags: 0x0
cmd_line: (hd0)/boot/grub/menu.lst
stack: 0x947780-0x967780
MM: Init
_text: 0x0
_etext: 0x60dec
_erodata: 0x75000
_edata: 0x7cb58
stack start: 0x947780
_end: 0x967d14
start_pfn: 9f7
max_pfn: 20000
Mapping memory range 0xc00000 - 0x20000000
setting 0x0-0x75000 readonly
skipped 0x1000
MM: Initialise page allocator for af1000(af1000)-0(20000000)
MM: done
Demand map pfns at 20001000-a0001000.
Heap resides at a0002000-e0002000.
Initialising timer interface
Initialising console ... done.
gnttab_table mapped at 0x20001000.
Initialising scheduler
Thread "Idle": pointer: 0xa0002008, stack: 0xc00000
Initialising xenbus
Thread "xenstore": pointer: 0xa0002478, stack: 0xc10000
Dummy main: start_info=0x967880
Thread "main": pointer: 0xa00028e8, stack: 0xc20000
"main" "(hd0)/boot/grub/menu.lst"
vbd 51712 is hd0
******************* BLKFRONT for device/vbd/51712 **********
backend at /local/domain/0/backend/vbd/596/51712
Failed to read /local/domain/0/backend/vbd/596/51712/feature-flush-cache.
409600 sectors of 0 bytes
**************************
vbd 51728 is hd1
GNU GRUB version 0.97 (524288K lower / 0K upper memory)
[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grubdom>
I guess that there is something bad in my grub configuration.
I tried changing the 'root device' setting in the Linode configuration Profile to /dev/xvdc (where my root lives) but the same result.
I am totally lost, and no other topics / documents in Linode helped me.
Questions
What is happening with my grub based booting?
Is it a problem with Ubuntu, Kernel or Linode version?
Is it possible to boot from a separate /boot partition and mount an encrypted / root partition on Linode?
If so, mm I following the right stepts?
Any help that makes me be on the right track will be really appreciated.
J
2 Replies
Try creating a folder in your boot partition called "boot" and then copy your grub folder into that and reboot. I think that's all you need to do it's been a bit since I've done this.
that was the problem.
I copied all files within /boot (that is, my sepparate parition /dev/xvda <–> /boot) in /boot/boot
(it seems that linode manager looks for /boot/grub/menu.lst in the partition specified as boot)
In menu.lst I checked that root and boot partitions were properly set > "root(x,y)" refers to the boot partition, while "root=/dev/…" refers to the partition containing the / directory
after update-grub (and copying to /boot/boot/grub/menu.lst) I had
title Ubuntu 12.04 LTS, kernel 3.2.0-26-virtual
root (hd0)
kernel /vmlinuz-3.2.0-26-virtual root=[b]/dev/xvdc[/b] console=hvc0 ro quiet quiet splash
initrd /initrd.img-3.2.0-26-virtual
title Ubuntu 12.04 LTS, kernel 3.2.0-26-virtual (recovery mode)
root (hd0)
kernel /vmlinuz-3.2.0-26-virtual root=/dev/xvdc console=hvc0 ro quiet single
initrd /initrd.img-3.2.0-26-virtual
And in linode manager I select:
Kernel: pvgrub-x8632
Xenify Distro No
root device /dev/xvda
Thanks for pointing me in the right direction