[PLUG] Device ID in Grub

John Jason Jordan johnxj at comcast.net
Sun Feb 11 08:02:18 UTC 2007


On Sat, 10 Feb 2007 22:51:58 -0800 (PST)
Elliott Mitchell <ehem at m5p.com> dijo:

> >From: John Jason Jordan <johnxj at comcast.net>
> > 1) Although I booted back to my usual installation, the boot screen
> > went through pages of stuff, including a lot of error messages. It was
> > too fast to read any of them, but there was a lot. It never used to do
> > that. 
> 
> Run the program `dmesg`, that will retrieve those messages. You'll likely
> want to pipe it through `more` or `less` in order to view them. Error
> messages on startup are generally bad, don't ignore it when your system
> screams.

After I sent that message I looked again at the menu.lst file and
noticed that the root= was on a line following the kernel line. I also
noticed that it still said (hd0,2) even though I thought I had changed
it to (hd0,1). But then I remembered that I had done that with the Grub
editor at the boot menu, not with a text editor. So after fixing things
with a text editor I rebooted and it's back to its normal boot process.

> > 2) More important, and possibly related to the first question,
> > apparently the long-ass string of numbers identifies someplace on the
> > hard disk where Grub is to find the boot folder. (I did copy it down
> > faithfully so I can put it back if necessary.) But why use something
> > that humans can't understand when /dev/hda2 works as well. Or does it
> > work as well? 
> 
> The problem is that device identifiers can change. If a disk is added or
> moved, everything can change. While the UUID is supposed to be completely
> unique to the filesystem, therefore even if the device moves around you
> can still uniquely identify the filesystem.
> 
> You can retrieve the UUID with `tune2fs -l` on the device, and ensure the
> grub config has the right thing.

Didn't work. I read the options for tune2fs and still can't get it
right. According to the Help the option is -U, not -l, but it still
doesn't work. I got closest with

jjj at Devil5:~$ sudo tune2fs -U UUID /dev/hda2
tune2fs 1.39 (29-May-2006)
tune2fs: Invalid UUID format

All other attempts just give me the option list.

On the other hand, while I understand that adding a disk can change
everything, this is a laptop and there isn't room for another disk. I
think I'll just stick to /dev/hda2. But having said that, it
was /dev/hda2 before the kernel upgrade, and Ubuntu in its wisdom
changed it to a UUID, and the wrong one at that. So leaving it
at /dev/hda2 probably won't save me any future grief.

> > Is there no mechanism in apt to protect config files of your choosing,
> > like gentoo portage has?  In portage, you just add a CONFIG_PROTECT
> > variable and value to /etc/make.conf.
> 
> John, hopefully you're still reading.
> 
> There are three control files for kernel-package. The first is
> /etc/kernel-pkg.conf, which can be overridden by a .kernel-pkg.conf file
> in your home directory. This controls build-time settings, such as what
> config target to use. Then there is /etc/kernel-img.conf, this controls
> behavior on installation of the packaged kernel. Such as whether the
> bootloader installation program gets rerun, whether the boot loader
> config is modified to boot the new kernel, etc.
> 
> John, look at the man page for kernel-img.conf to find out all the
> wonderful settings you can play with (notably disable). Carlos, the main
> program for kernel-package is `make-kpkg`. The key advantage is it gives
> you a very nice way to /uninstall/ old kernels.

Can't find the man page for kernel-img.conf. Is that what it's called?



More information about the PLUG mailing list