LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 05-17-2006, 07:27 PM   #1
donv2
Member
 
Registered: Nov 2004
Location: Upper right corner of USA
Distribution: Ubuntu/Mint, unSLUng (NSLU2), Arch/PlugApps (Dockstar)
Posts: 50

Rep: Reputation: 15
Motherboard change impacts disk naming, requires grub reconfiguration?


Had my prior Soyo MBD stop appreciating my two SATA drives, decided to snub them. Would see IDE fine, etc. just not the SATA drives. BIOS changes, Knoppix browsing, nothing worked. So enter new MBD.

Now that the new Gigabyte board is installed, can see the drives again (verified under Knoppix). However, what was previously /dev/hde and /dev/hdf under the Soyo is now reported as /dev/sda and /dev/sdb under the Gigabyte.

As a result, I can't boot any of the multiple OS installed. Would love to simply maintain my installs without having to start over. I have tried some edits to /etc/fstab and grub-related files as detailed below but still not having success. Grub menu comes up and starts the boot process on all the OS but they all crap out at some point during the boot sequence; FC5 gets the furthest along but then ends in a kernel panic after complaining about not finding root partition, etc.

I've tried googling and looking at the Gnu Grub site but am not able to figure this out so far. Would appreciate any pointers on what to do at this point to recover operation of the system without reinstallation of the OS (FC5 at least, I'm moving off of Win98 so I can just recover my data files from there and I'll be fine).

Code:
fdisk -l

Disk /dev/sda: 120.0 GB, 120059362816 bytes
255 heads, 63 sectors/track, 14596 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id System
/dev/sda1               1        1306    10490413+   c W95 FAT32 (LBA)
/dev/sda2   *        1307        2613    10493280   bf Solaris
/dev/sda3            2614        3918    10482412+  83 Linux
/dev/sda4            3919       14596    85771035    5 Extended
/dev/sda5            3919        5223    10482381   83 Linux
/dev/sda6            5224        5745     4192933+  82 Linux swap / Solaris
/dev/sda7            5746       14596    71095626    b W95 FAT32

Disk /dev/sdb: 120.0 GB, 120060444672 bytes
255 heads, 63 sectors/track, 14596 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id System
/dev/sdb1   *           1        2550    20482843+   c W95 FAT32 (LBA)
/dev/sdb2            2551       14595    96751462+   f W95 Ext'd (LBA)
/dev/sdb5            2551       12111    76798701    c W95 FAT32 (LBA)
/dev/sdb6           12112       14595    19952698+   e W95 FAT16 (LBA)
root@0[knoppix]#
Prior fstab
Code:
LABEL=/                 /                       ext3    defaults        1 1
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
LABEL=/home             /home                   ext3    defaults        1 2
proc                    /proc                   proc    defaults        0 0
sysfs                   /sys                    sysfs   defaults        0 0
LABEL=SWAP-hde6         swap                    swap    defaults        0 0
/dev/hde1               /mnt/new98          vfat    umask=0000,rw,uid=500,gid=500,users 0 2
/dev/hdf1               /mnt/oldwin98           vfat    umask=0000,rw,uid=500,gid=500,users 0 2
/dev/hdf5               /mnt/oldwin98_D         vfat    umask=0000,rw,uid=500,gid=500,users 0 2
fstab as now showing - the SWAP line is probably wrong, tried just matching the dev terminology in the label
Code:
LABEL=/                 /                       ext3    defaults        1 1
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
LABEL=/home             /home                   ext3    defaults        1 2
proc                    /proc                   proc    defaults        0 0
sysfs                   /sys                    sysfs   defaults        0 0
LABEL=SWAP-sda6         swap                    swap    defaults        0 0
/dev/sda1               /mnt/new98          vfat    umask=0000,rw,uid=500,gid=500,users 0 2
/dev/sdb1               /mnt/oldwin98           vfat    umask=0000,rw,uid=500,gid=500,users 0 2
/dev/sdb5               /mnt/oldwin98_D         vfat    umask=0000,rw,uid=500,gid=500,users 0 2
grub.conf - unchanged since before mbd swap
Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,2)
#          kernel /boot/vmlinuz-version ro root=/dev/hde3
#          initrd /boot/initrd-version.img
#boot=/dev/hde
default=0
timeout=5
splashimage=(hd0,2)/boot/grub/splash.xpm.gz
#hiddenmenu
password --md5 $1$CZnMoE2p$TZQ2dKOkAV.rUQQzqBTKe0
title Fedora Core (2.6.16-1.2111_FC5.stk16)
	root (hd0,2)
	kernel /boot/vmlinuz-2.6.16-1.2111_FC5.stk16 ro root=LABEL=/ 
	initrd /boot/initrd-2.6.16-1.2111_FC5.stk16.img
title Fedora Core (2.6.16-1.2080_FC5)
	root (hd0,2)
	kernel /boot/vmlinuz-2.6.16-1.2080_FC5 ro root=LABEL=/ 
	initrd /boot/initrd-2.6.16-1.2080_FC5.img
title Fedora Core (2.6.15-1.2054_FC5)
	root (hd0,2)
	kernel /boot/vmlinuz-2.6.15-1.2054_FC5 ro root=LABEL=/ 
	initrd /boot/initrd-2.6.15-1.2054_FC5.img
title Solaris 10 U1
	rootnoverify (hd0,1)
	chainloader +1
title Windows
	rootnoverify (hd0,0)
	chainloader +1
title OldWin98
	map (hd0) (hd1)
	map (hd1) (hd0)
	rootnoverify (hd1,0)
	chainloader +1
original device.map file
Code:
# this device map was generated by anaconda
(hd0)     /dev/hde
latest device.map
Code:
# this device map was generated by anaconda
(hd0)     /dev/sda
 
Old 05-17-2006, 07:54 PM   #2
donv2
Member
 
Registered: Nov 2004
Location: Upper right corner of USA
Distribution: Ubuntu/Mint, unSLUng (NSLU2), Arch/PlugApps (Dockstar)
Posts: 50

Original Poster
Rep: Reputation: 15
BTW, here are some selected messages that are on the screen up to the point it hangs when attempting to boot FC5. The resume ones I find interesting... the old MBD showed a couple of flaky boots before it totally gave up on the SATA drives; I wonder whether that caused some resume/recovery files to be created?

lots of standard boot messages, sees and configures new chipset drivers, etc... ending with:
.
.
.
Trying to resume from LABEL=SWAP-hde6 <<NOTE, THIS IS A NEW MESSAGE BUT USES PRIOR DISK NAME NOTATION>>
Unable to access resume device (LABEL=SWAP-hde6)
Creating root device.
Mounting root filesystem.
mount: could not find filesystem '/dev/root'
Setting up other filesystems.
Setting up new root fs
setuproot: moving /dev failed: No such file of directory
no fstab.sys, mounting internal defaults
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
Switching to new root and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
switchroot: mount failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init!
[<c011b2b2>] panic+0x3e/0x170 AND SO ON...

Last edited by donv2; 05-17-2006 at 07:56 PM.
 
Old 05-18-2006, 05:59 AM   #3
decrepit
Member
 
Registered: May 2006
Distribution: Ubuntu10.04, < fedora12
Posts: 347

Rep: Reputation: 34
This is where grub passes root info to kernel,
kernel /boot/vmlinuz-2.6.16-1.2111_FC5.stk16 ro root=LABEL=/

Not sure how or where LABEL gets resolved into a partition

You could try changing the Label=/ to /dev/sda#
where "#" is the partion number of /


On my multiboot system this is one of my entries, (and it works)
kernel /vmlinuz-2.6.12-1.1381_FC3 ro root=/dev/hda3 rhgb quiet

Be interested to hear if it helps!
Also core5 uses fstab diferently to earlier versions so I'd try this with an earlier version as well.
 
Old 05-18-2006, 07:47 PM   #4
donv2
Member
 
Registered: Nov 2004
Location: Upper right corner of USA
Distribution: Ubuntu/Mint, unSLUng (NSLU2), Arch/PlugApps (Dockstar)
Posts: 50

Original Poster
Rep: Reputation: 15
Labels are carried with the partition table (not sure this is the correct term, but it is not part of the OS data, but rather part of the partitioning info on the disk). Apparently they are using this notation as a way to *help* in the instance of moving a drive, as the partition labels would not change but the device numbering could. By using labels it should avoid just what I'm running into. OK, that said...

I tried the change to move to disk/partition numbering instead of LABEL= notation (both in grub.conf and fstab), and I am still running into the same issue. I think the problem is really the "Resume" item I noted above. It seems there is something recorded in a file somewhere that has hardcoded the old SWAP-hde6 partition label to be sought and that is being used to point to the (originally right) wrong place, which then can't be found. I tried using QTparted to see the label for the swap partition and it does not show there (while others do).

At this point, I believe I'm just going to punt and go for the reinstall as the above if it worked would only have fixed things for FC5 anyway. The things I had previously put most of my work into were stored in /home so I'll get to retain that and the install otherwise will go predictably.

Thanks for your help!
 
Old 05-19-2006, 05:02 AM   #5
decrepit
Member
 
Registered: May 2006
Distribution: Ubuntu10.04, < fedora12
Posts: 347

Rep: Reputation: 34
It would have been nice if I actually was a help!!!! But it's all part of the learning curve, onward and upward!!!!
Mike
 
Old 09-06-2006, 12:45 PM   #6
jdelongpre
LQ Newbie
 
Registered: Sep 2006
Location: Kentwood, MI
Distribution: Fedora, mostly. Testing SUSE, Testing eee pc
Posts: 9

Rep: Reputation: 0
Talking I've solved it.

I copied a Fedora 5 system from one machine to a new one using a tar archive of / and made it work. While doing this, I solved your problems.

Your boot problem is because the partition label didn't match the source system, my experience tells me. You COULD change grub AND /etc/fstab and I've made that work before, but just using the expected labels is much easier. Here's the whole of what I did and how I overcame your problem.

Source: Athlon, SATA, 512MB ram
Target: P2, PATA, 256MB ram

I used the F5 rescue cd to boot the new machine and then fdisk to partition the drive into 9GB data and 512MB swap. Two primary partitions, the same as on the source system (both smaller, different device, no third 400GB "samba" partition, but matching closely enough).

I then used "mkfs -t ext3 /dev/hda1" and "mkswap -L SWAP-hda2 /dev/hda2" to format the partitions. That also labelled swap properly. To put the proper label on the ext3 partition, I used "e2label /dev/hda1 /1"

Tar produced with:
tar --absolute-names --preserve-permissions \
--exclude '/proc/*' --exclude '/dev/*' \
--exclude '/sys/*' --exclude '/var/run/*' \
--exclude /samba \
--exclude '/var/log/*gz' \
-czf /samba/big/fedora5root.tgz /

and restored by:
mkdir /mnt/stuff
mount /dev/hda1 /mnt/stuff
cd /mnt/stuff
ftp (to fetch tar) then
tar -xzf fedora5root.tgz

To build the boot information, I used:
"grub" "root (hd0,0)" "setup (hd0)" "quit"

This didn't all work the first time, of course, and I'm trying to net the procedure. The results are a clone of my first system on different hardware. All of my careful setup, customizing, and updating are now done on another system and I'm ready to change the name and IP address and make it distinct.

fdisk should add support for partition labels, but the work around is easy once known. Maybe I'll contribute some fdisk code...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adobe Acrobate Reader Requires A Plugin-That Requires Open LDAP That Requires Berkely Old_Fogie Slackware 10 05-08-2006 05:04 AM
APT Requires Debian Disk carlosinfl Debian 9 05-06-2006 12:54 PM
Help with grub reconfiguration corelover Linux - Software 4 05-04-2005 05:26 PM
Arch Linux hard disk naming reddazz Arch 15 04-22-2005 03:39 AM
Grub (error 17) won't boot after new motherboard/vid card.. boot disk anyone? r3dhatter Linux - Newbie 5 02-16-2005 06:52 PM


All times are GMT -5. The time now is 11:56 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration