Disk drive vanished (solved)

Using applications, configuring, problems
Post Reply
Message
Author
ahoppin
Posts: 172
Joined: Mon 16 May 2011, 04:13

Disk drive vanished (solved)

#1 Post by ahoppin »

I'm using a venerable old Asus A7N8X deluxe mb, 2gb memory, Athlon XP 3200 processor. I have a full installation of Lupu 525, dual booted with Win98 (see below for details).

Total of 4 disks (used to be 3, more on that later).

1. MB IDE controller - 120gb with 2 VFAT partitions, one is WIN98 and the other is data.

2. MB SATA controller - 0.5tb with 4 VFAT partitions, all for data.

3. SiI 0680 IDE controller - 250gb with a 32gb EXT2 for root, a 5gb swap, and the rest EXT2 for /home.

4. SiI 3124-2 SATA controller - 1tb with 3 EXT3 partitions and a 5gb swap (eventually to become the new Puppy drive, I hope)

I'm dual booting with Win98SE. I use grub4dos from Win98's CONFIG.SYS SHELL command. Grub4dos loads the full installation of Lupu 525 on the first partition of the 250gb drive (#3 above).

Here is what I had before in /grub/menu.lst. It's pretty much what Puppy's universal installer told me to use when I did the installation.

Code: Select all

	timeout=10

	default=0

title Puppy 525 on hd1 (sdc)

	root (hd2,0)

	kernel /boot/vmlinuz root=/dev/sdc1 pmedia=atahd
When I added the new disk, I got an error ("Kernel panic - not syncing").

I rebooted, dropped to command line in grub, and did a "find /boot/vmlinuz". Grub found it in the same place as before, so I left the root (hd2,0) command as it was.

Then I booted a Puppy 5.25 live CD and found that the new drive was sdb (no surprise, since Lupu seems to always put SATA drives first). The MB IDE drive that used to be sdb* was now sdc*, and the aux IDE drive (with Puppy installation) that used to be sdc* was now sdd*.

So I edited menu.lst, changing /dev/sdc1 to /dev/sdd1.

I also edited /etc/fstab to change entries for /dev/sdb* to /dev/sdc*, and entries for /dev/sdc* to /dev/sdd*.

Now the full installation of Puppy boots fine, but the entire disk it's on has (virtually) gone missing!

There is no entry in /dev for sdd, sdd1, or sdd3. Even more odd, there is also no /dev/root.

sdd1 and sdd3 don't show up on the desktop as system drives.

However, when I boot Puppy from CD (puppy pfix=ram), all the drives DO appear on the desktop.

Can anyone suggest what might be wrong? Do I have to add something to the Grub menu.lst so Puppy can see the 4th drive?

Thanks for any clues you can provide.
Last edited by ahoppin on Sat 05 May 2012, 17:54, edited 1 time in total.

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#2 Post by Karl Godt »

There is an IDE kernel 2.6.31.14 for such setupts .
Search bkhome.org for that kernel .
Otherwise i would compile the kernel myself, since full install no problem with aufs and usb-storage ...

IDE-0 MASTER = sda = hd0,
IDE-0 SLAVE = sdb = hd1,

IDE-1 MASTER = sdc = hd2,
IDE-1 SLAVE = sdd = hd3,

To create missing device nodes : google " man mknod manual page " .

Probably " partprobe " or " busybox mdev " are capable to update the device nodes automatically .

You should copy the missing nodes from a working Puppy /dev/ directory into the ones with missing /dev/sda1 etc .

partprobe or busybox mdev can be put into /etc/rc.sysinit OR /sbin/init somewhere after mount -o remount,rw / and before loading modules OR /sbin/init .

(This all does not help if the rootpartition node is missing .)

/dev/root does not exist by default i think . I have to create it manually by

Code: Select all

root_link_func() {
echo "root_link_func "`date`
	if test "`busybox df | grep -w '/' | grep '/dev/root'`" != "" ; then
	if test ! -L /dev/root ; then
	RD=`dmesg | grep 'Mounted root'`
	device=`echo "$RD" | grep -o -i 'device .*' | cut -f 2 -d ' '`
	MAJ=`echo $device | cut -f 1 -d ':'`
	Min=`echo $device | cut -f 2 -d ':' | sed 's#\.$##'`
	#rootdevice=`grep -E "$MAJ|$Min" /proc/partitions` 
	rootdevice=`grep -w $MAJ /proc/partitions | grep -w $Min | tr -s [[:blank:]] | cut -f 5 -d ' '` 
	ln -s /dev/$rootdevice /dev/root
	fi
	fi
}

root_link_func
which should give something like this :
bash-3.2# ls -l /dev/root
lrwxrwxrwx 1 root root 9 2012-05-05 17:49 /dev/root -> /dev/sda3
bash-3.2# rm /dev/root ## deletes the link
bash-3.2# root_link_func
root_link_func Sa 5. Mai 17:49:23 GMT+1 2012
bash-3.2# ls -l /dev/root
lrwxrwxrwx 1 root root 9 2012-05-05 17:49 /dev/root -> /dev/sda3
bash-3.2#
Voil`a

I will have to test it with partptobe/mdev myself, until now i was doing it by

Code: Select all

echo -n "Updating Device nodes " >/dev/console
STATUS=0
CATPROCPART=`cat /proc/partitions | sed 's#^\ *[[:alpha:]].*##g' | sed '/^$/d'`
echo "$CATPROCPART" | while read MAJ MIN SIZE SDEV ; do
rm -f "$1"/dev/$SDEV
STATUS=$(( $STATUS + $? ))
mknod "$1"/dev/$SDEV b $MAJ $MIN
STATUS=$(( $STATUS + $? ))
echo -n '.' >/dev/console
done
in /sbin/init .

This is particular usefull if booting kernels with not-mounting DEVTMPFS enabled and when the kernel gets halted, the /dev directory is left empty .

ahoppin
Posts: 172
Joined: Mon 16 May 2011, 04:13

#3 Post by ahoppin »

Thanks a million! That was exactly the clue I needed.

I loaded a live Puppy cd and compared ls -l /dev/sdd? with ls -l /mnt/sdb1/dev/sdd?

I probably could have just copied the entries, but to be sure, I used mknod to create the missing entries, using the same major and minor node numbers, and setting permission and ownership identically.

Also did ln -s /mnt/sdb1/dev/sdb1 /mnt/sdb1/dev/root

Now the prodigal drive has reappeared. Thanks again!

Post Reply