[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Kernel install problem



Roberto C. Sanchez wrote:
On Thu, Mar 01, 2007 at 12:09:49PM -0500, Kevin Mark wrote:
why do you use "/boot/boot/grub/" and not the default "/boot/grub/"?
what is in /boot/grub/menu.lst vs /boot/boot/grub/menu.lst ?

Using /boot/boot/grub is necessary when /boot is its own filesystem.

Regards,

-Roberto


Not so.  My setup is:

$ uname -r
2.6.18-3-686
$ mount|grep boot
/dev/sda1 on /boot type ext3 (rw)
$ ls /boot/*2.6.18-3-686*
/boot/System.map-2.6.18-3-686  /boot/initrd.img-2.6.18-3-686
/boot/config-2.6.18-3-686      /boot/vmlinuz-2.6.18-3-686
$grep boot /etc/fstab
/dev/sda1     /boot        ext3    defaults      0     2

My /boot/grub/menu.lst for the default boot:

title           Debian GNU/Linux, kernel 2.6.18-3-686
root            (hd0,0)
kernel          /vmlinuz-2.6.18-3-686 root=LABEL=/root ro
initrd          /initrd.img-2.6.18-3-686

===

NOTE that the path names for the kernel and initrd image DO NOT have a leading '/boot', this is because, for the filesystem on /dev/sda1, these files are 'connected' to the filesystem's 'root', which ONLY becomes /boot/... when the system is up and running, with filesystems from the fstab file mounted.

The above was set up automatically, during the install, by the Debian installer. I explicitly selected to have '/boot' be a separate file system. I suspect the OP's problem is, in fact, because of the differences between what the actual setup is and what the dpkg scripts expect. I further conjecture that the original install was with /boot on the root filesystem, and that a later decision was made to change it, with the boot files on a separate filesystem.

To fix this, as root:

# cd /boot/boot
# mv * .. # no hidden files to worry about.
# cd ..
# rmdir boot
# edit /etc/fstab
  - add/modify line to mount the boot partition, see above example
# edit grub/menu.lst
  - to fix any kernel/initrd paths, removing /boot, see above example
# reboot
...
# apt-get update ....

Of course, you should make backups of everything, just in case. And, rather than just removing the extra 'boot' directory, you might also want to do 'ln -s . boot', so if there are any residual dependencies on /boot/boot/..., they will automatically resolve to the right place.

Bob

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Reply to: