Skip to contentSkip to conversation

mount: / mounted already or bad option

DISCUSSION SMS WebMaster 2 participants 4 messages Oct 10, 2003

lore
Share & tools
lore
#0 lore raw

Hi
I have Gentoo linux in my PC
I just installed the kernel 2.4.22 and compile it and install it (using genkernel command) Right now if I reboot my PC with my new kernel I got :
mount: / mounted already or bad option
and the system stop and ask me to type the root password
and when I login with the root and type
mount -o remount,rw /

I got the same message
mount: / mounted already or bad option

but if I write
mount -o remount,rw /dev/hda4 /
then the root filesystem if remounted as read/write

Anyway the stupid thing is that if I boot with my old kernel I don't get this problem !!! Any Help

My /etc/fstab :

/dev/hda2 /boot ext2 noauto,noatime

       1 1
/dev/hda4               /               reiserfs defaults,noatime,notail,iocharset=utf8          0 0
/dev/hda3               none            swap            sw 
       0 0

/dev/hda1 /mnt/win ntfs auto,ro,umask=000,iocharset=utf0 0
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro,umask=000,iocharset=utf8 0 0
/dev/fd0 /mnt/floppy vfat noauto,defaults,umask=000,iocharset=utf8 0 0
none /proc proc defaults

       0 0
none                    /dev/shm        tmpfs           defaults 
       0 0

My /etc/lilo.conf :
image = /boot/kernel-2.4.22
root = /dev/hda4
label = Gentoo
initrd=/boot/initrd-2.4.22 append="root=/dev/hda4 init=/linuxrc hdc=ide-scsi"

image = /boot/kernel-2.4.20-gentoo-r5
root = /dev/hda4
#root = /devices/discs/disc0/part3
label = Old-Gentoo initrd=/boot/initrd-2.4.20-gentoo-r5 #read-only # read-only for checking append="root=/dev/hda4 init=/linuxrc hdc=ide-scsi"

Signature · 4 lines
http://www.4-SMS.Com
http://eShop.4-SMS.Com
http://Mozilla.4-SMS.Com
-*- If Linux doesn't have the solution, you have the wrong problem -*-
#1 lore raw
Quoted 10 lines · SMS WebMaster

Hi
I have Gentoo linux in my PC
I just installed the kernel 2.4.22 and compile it and install it (using genkernel command)
Right now if I reboot my PC with my new kernel I got :
mount: / mounted already or bad option
and the system stop and ask me to type the root password
and when I login with the root and type
mount -o remount,rw /

Quoted 6 lines

I got the same message
mount: / mounted already or bad option

but if I write
mount -o remount,rw /dev/hda4 /
then the root filesystem if remounted as read/write

wouldn't your /etc/mtab be a link to /proc/self/mounts with /proc not mounted ?

Willy

#2 lore raw
Quoted 14 lines · Willy Tarreau
Quoted 12 lines · SMS WebMaster

Hi
I have Gentoo linux in my PC
I just installed the kernel 2.4.22 and compile it and install it (using genkernel command) Right now if I reboot my PC with my new kernel I got :
mount: / mounted already or bad option
and the system stop and ask me to type the root password
and when I login with the root and type
mount -o remount,rw /

I got the same message
mount: / mounted already or bad option

Quoted 6 lines
Quoted 3 lines

but if I write
mount -o remount,rw /dev/hda4 /
then the root filesystem if remounted as read/write

wouldn't your /etc/mtab be a link to /proc/self/mounts with /proc not mounted ?

Sorry what do you mean ?

if I type mount I can see that proc is mounted (I can even see / is mounted as read/write but its not realy mounted as read/write)

Quoted 10 lines

Willy

-
To unsubscribe from this list: send the line "unsubscribe linux-userfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 4 lines
http://www.4-SMS.Com
http://eShop.4-SMS.Com
http://Mozilla.4-SMS.Com
-*- If Linux doesn't have the solution, you have the wrong problem -*-
#3 lore raw
Quoted 11 lines · SMS WebMaster
Quoted 11 lines
Quoted 9 lines

and when I login with the root and type
mount -o remount,rw /

I got the same message
mount: / mounted already or bad option

but if I write
mount -o remount,rw /dev/hda4 /
then the root filesystem if remounted as read/write

Quoted 5 lines
Quoted 2 lines

wouldn't your /etc/mtab be a link to /proc/self/mounts with /proc not mounted ?

Sorry what do you mean ?

I meant that when you use the "incomplete" syntax with mount (ie: no device specified), it relies on /etc/mtab to find the mount entry you want to change. And it's somewhat common to have /etc/mtab be a symlink to /proc/self/mounts when you don't want /etc to be written to, because the 'mounts' entry has nearly the same format as 'mtab' (a few missing options). Now if it was the case, and /proc was not mounted yet, /etc/mtab would point to nowhere and mount would have no way to find what was mounted on '/', which could lead to some errors like this.

Quoted 2 lines

if I type mount I can see that proc is mounted (I can even see / is mounted as read/write but its not realy mounted as read/write)

OK, so it doesn't come from this. Perhaps your /etc/mtab is simply broken by some random mount option somewhere ? Also, do you use the "read-only" option on the kernel command line ? And do your init scripts clear /etc/mtab at boot, before the first mounts ?

Willy