tims
asked on
/dev/hda7 = /dev/hdb1 mount one, mount all
Hi, I have a RedHat 8 system with two harddisks setup so:
/dev/hda7 / - ext3
/dev/hda1 /boot - ext3
/dev/hda5 /home - ext3
/dev/hdb1 unused but ext3
When I mount /dev/hdb1 it gives me the same contents as /dev/hda7, i.e. the root partition. When I create/delete/modify in one, it does the same in the other.
Results from mount:
# mount
/dev/hda7 on / type ext3 (rw)
none on /proc type proc (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/hda1 on /boot type ext3 (rw)
/dev/hda5 on /home type ext3 (rw)
none on /dev/shm type tmpfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /dev/shm type tmpfs (rw)
/dev/hdb1 on /mnt/temp type ext3 (rw)
Results from df:
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda7 19172900 15428068 2770896 85% /
/dev/hda1 54416 18918 32689 37% /boot
/dev/hda5 12800504 10763592 1386684 89% /home
none 188876 0 188876 0% /dev/shm
none 188876 0 188876 0% /dev/shm
/dev/hdb1 19172900 15428068 2770896 85% /mnt/temp
proc seems to think that the disks are different:
# cat /proc/ide/hda/model
ST320413A
# cat /proc/ide/hdb/model
Maxtor 92041U4
There are no strainge links in /dev:
# ls -l /dev/hda7
brw-rw---- 1 root disk 3, 7 Aug 31 2002 /dev/hda7
# ls -l /dev/hdb1
brw-rw---- 1 root disk 3, 65 Aug 31 2002 /dev/hdb1
Any ideas would be gratefully received.
Tim.
/dev/hda7 / - ext3
/dev/hda1 /boot - ext3
/dev/hda5 /home - ext3
/dev/hdb1 unused but ext3
When I mount /dev/hdb1 it gives me the same contents as /dev/hda7, i.e. the root partition. When I create/delete/modify in one, it does the same in the other.
Results from mount:
# mount
/dev/hda7 on / type ext3 (rw)
none on /proc type proc (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/hda1 on /boot type ext3 (rw)
/dev/hda5 on /home type ext3 (rw)
none on /dev/shm type tmpfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /dev/shm type tmpfs (rw)
/dev/hdb1 on /mnt/temp type ext3 (rw)
Results from df:
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda7 19172900 15428068 2770896 85% /
/dev/hda1 54416 18918 32689 37% /boot
/dev/hda5 12800504 10763592 1386684 89% /home
none 188876 0 188876 0% /dev/shm
none 188876 0 188876 0% /dev/shm
/dev/hdb1 19172900 15428068 2770896 85% /mnt/temp
proc seems to think that the disks are different:
# cat /proc/ide/hda/model
ST320413A
# cat /proc/ide/hdb/model
Maxtor 92041U4
There are no strainge links in /dev:
# ls -l /dev/hda7
brw-rw---- 1 root disk 3, 7 Aug 31 2002 /dev/hda7
# ls -l /dev/hdb1
brw-rw---- 1 root disk 3, 65 Aug 31 2002 /dev/hdb1
Any ideas would be gratefully received.
Tim.
ASKER
One fstab for your enjoyment
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
LABEL=/home /home ext3 defaults 1 2
#/dev/fd0 /mnt/floppy auto noauto,owner 0 0
#LABEL=/usr /usr ext3 defaults 1 2
#LABEL=/var /var ext3 defaults 1 2
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
none /dev/pts devpts gid=5,mode=620 0 0
/dev/hda8 swap swap defaults 0 0
none /proc/bus/usb usbdevfs defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
What I have noticed is that grub.conf has root=/dev/hdb1 ....
title Red Hat Linux (2.4.19)
root (hd0,0)
kernel /vmlinuz-2.4.19 ro root=/dev/hdb1
which is wrong - I'm connecting via ssh at the moment so don't want edit the grub.conf and reboot if I can help it.
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
LABEL=/home /home ext3 defaults 1 2
#/dev/fd0 /mnt/floppy auto noauto,owner 0 0
#LABEL=/usr /usr ext3 defaults 1 2
#LABEL=/var /var ext3 defaults 1 2
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
none /dev/pts devpts gid=5,mode=620 0 0
/dev/hda8 swap swap defaults 0 0
none /proc/bus/usb usbdevfs defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
What I have noticed is that grub.conf has root=/dev/hdb1 ....
title Red Hat Linux (2.4.19)
root (hd0,0)
kernel /vmlinuz-2.4.19 ro root=/dev/hdb1
which is wrong - I'm connecting via ssh at the moment so don't want edit the grub.conf and reboot if I can help it.
That's may be the reason your grub give out the wrong info about the /, so once you got your chance please try change the root=/dev/hdb1 to root=/dev/hda1, I think this will solve
ASKER
Thanks. I will try it now but do you mean /dev/hda7, which is my actual root partition?
upon your info here yes your root is in /dev/hda7
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda7 19172900 15428068 2770896 85% /
/dev/hda1 54416 18918 32689 37% /boot
/dev/hda5 12800504 10763592 1386684 89% /home
sorry my typo mistake please try change the root=/dev/hdb1 to root=/dev/hda7
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda7 19172900 15428068 2770896 85% /
/dev/hda1 54416 18918 32689 37% /boot
/dev/hda5 12800504 10763592 1386684 89% /home
sorry my typo mistake please try change the root=/dev/hdb1 to root=/dev/hda7
ASKER
Changed /dev/hdb1 to /dev/hda7 in grub.conf and rebooted, unfortunatley it has not come back up. I'll have to wait till tomorrow until I see the console. I'll update you then.
Thanks again, Tim.
Thanks again, Tim.
ASKER
kernel panic : no init found.. Try passinig init= option to kernel .
hummmm....... oh yup, boot to single user
cd /boot
mkinitrd -v -f init-2.4.19.img 2.4.19
reboot
nope. still the same init= error.
Do you think it's worth changing my fstab so it does not refer to LABELs - just to the devices? e.g.
LABEL=/ / ext3 defaults 1 1
would change to
/dev/hda7 / ext3 defaults 1 1
hummmm....... oh yup, boot to single user
cd /boot
mkinitrd -v -f init-2.4.19.img 2.4.19
reboot
nope. still the same init= error.
Do you think it's worth changing my fstab so it does not refer to LABELs - just to the devices? e.g.
LABEL=/ / ext3 defaults 1 1
would change to
/dev/hda7 / ext3 defaults 1 1
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yup, you are right. When I look at df, it shows / has having 3.5G free. When I look at hda using fdisk, it shows hda7 as being a 235M partition!
I'm going to rebuild the system from scratch using a brand new disk for the root. For the last 4 years the poor thing has just been upgraded.
Thanks again for your help.
Tim.
I'm going to rebuild the system from scratch using a brand new disk for the root. For the last 4 years the poor thing has just been upgraded.
Thanks again for your help.
Tim.
upon what you told here
/dev/hda7 19172900 15428068 2770896 85% /
/dev/hdb1 19172900 15428068 2770896 85% /mnt/temp
The mount point is difference, but the usage and available space bla bla bla is the same so strange, pls post your fstab here