[Madlug] File System Weirdness

digitek digitek at charter.net
Mon Jul 2 07:12:13 CDT 2007


Staci said the following on 06/29/2007 10:25 PM:
> So, I have one regular IDE drive and one SATA.  Long story short, the 
> labels are coming up weird.  Could this have anything to do with the 
> message at bootup "Primary master:<not found> Secondary master:SATA"...

Yep. just the bios probing and saying "nothing there, thought I'd let you know".
(as you mentioned later)

> proc                                       /proc            proc         
> defaults                        0  0 
> # /dev/hdc2
> /dev/sdb2  /                ext3         defaults,errors=remount-ro      

I'd boot from knoppix or whatever and mount /dev/sda2 on /tmp/foo
or something.  Then make sure that /tmp/foo does indeed contain the
boot partition.

If so, edit /tmp/foo/etc/fstab and comment out everything but the
sdb2 entry above.  Then change the sdb2 entry to sda1.  Reboot and
if you get a grub/lilo prompt boot into single user mode.

If you get into single user mode, check[1] out your swap partition next.

Note that grub may be booting[2] with the *label* of a screwed up partition
so you may need to ditch the UUID line in /boot/grub/menu.lst and just put
in /dev/sda1.


> So it seems that EITHER label sdb or hcd in fstab will work. 
> It works at the moment...but Grub won't work, and liloconfig says:

Yes, I agree with lilo here that fstab has an empty partition for /dev/sdb2.
It's there (as seen with sfdisk) but it's not in use.

Also, the disk labels can bite you if you start hacking around because of
thinks like grub loading the UUID[2] instead of the disk partition.
Dunno what the big advantage of disk labels are other than allowing people
to randomly change drives around without worrying about editing /etc/fstab.

Thomas


[0]
root at foo-desktop:~# grub-install --root-directory=/tmp/foo /dev/sda
Installation finished. No error reported.
This is the contents of the device map //boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(hd0)   /dev/sda
root at foo-desktop:~#

[1]
root at foo-desktop:~# sfdisk -l
<snip>
/dev/sda5        492+    521      30-    240943+  82  Linux swap / Solaris

root at foo-desktop:~# swapon /dev/sda5

root at foo-desktop:~# swapon -s
<snip>
Swap:       240932          0     240932

root at foo-desktop:~# fgrep swap /etc/fstab
#UUID=09851961-7605-4833-b89e-7c1751f1e3d7 none            swap    sw              0       0


[2]
root at foo-desktop:~# fgrep UUID /boot/grub/menu.lst
# kopt=root=UUID=b9e47734-ec47-4787-940e-c51bc7f8ac7e ro
kernel          /boot/vmlinuz-2.6.20-15-generic root=UUID=b9e47734-ec47-4787-940e-c51bc7f8ac7e ro quiet splash
kernel          /boot/vmlinuz-2.6.20-15-generic root=UUID=b9e47734-ec47-4787-940e-c51bc7f8ac7e ro single

-- 

digitek at charter.net
key id: 0xF6FA6D1E



More information about the Madlug mailing list