Jump to content

Prevent Partition Automounting


jodef

Recommended Posts

Installed D*** Small Linux on partition hdb1 on my system however Mandrake keeps automounting the DSL partition I would like to disable this behaviour.The partition mounts as hd1.Went to /etc/fstab saw /mnt/hd1 set to supermount removed this however when Mandrake restarts it automounts partition as /mnt/hd2 obviously am missing a step. Pls help.Thx. :thumbsup:

Link to comment
Share on other sites

  • Replies 155
  • Created
  • Last Reply

Top Posters In This Topic

  • jodef

    62

  • Owyn

    50

  • Bruno

    38

  • teacher

    4

Top Posters In This Topic

Please post contents of Mandrake's fstab.$ cat /etc/fstab
As requested:
/dev/hda5 / ext3 defaults 1 1none /dev/pts devpts mode=0620 0 0/dev/hda7 /home ext3 defaults 1 2none /mnt/cdrom supermount dev=/dev/scd0,fs=udf:iso9660,ro,--,iocharset=iso8859-1 0 0none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,sync,iocharset=iso8859-1,umask=0,codepage=850 0 0none /proc proc defaults 0 0/dev/hda6 /usr ext3 defaults 1 2/dev/hda8 swap swap defaults 0 0none /mnt/hd supermount dev=/dev/hdb1,fs=ext2:vfat,--,kudzu,iocharset=iso8859-1,codepage=850 0 0

Link to comment
Share on other sites

Yep.$ su# vi /etc/fstabPress I to go to insert modePress down arrow until at start of last line (hdb1)Press # to insert # at beginning of linePress Esc to exit insert modePress ZZ to exit viThenunmount hdb1# umount /mnt/hdand test fixes# mount -a# mount---------------------Later: Edited to fix umount command.

Edited by Owyn
Link to comment
Share on other sites

Yep.$ su# vi /etc/fstabPress I to go to insert modePress down arrow until at start of last line (hdb1)Press # to insert # at beginning of linePress Esc to exit insert modePress ZZ to exit viThenunmount hdb1# umount /mnt/hdand test fixes# mount -a# mount---------------------Later: Edited to fix umount command.
Owyn followed instructions to the letter but on reboot still mounts here is the output of fstab file:
/dev/hda5 / ext3 defaults 1 1none /dev/pts devpts mode=0620 0 0/dev/hda7 /home ext3 defaults 1 2none /mnt/cdrom supermount dev=/dev/scd0,fs=udf:iso9660,ro,--,iocharset=iso8859-1 0 0none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,sync,iocharset=iso8859-1,umask=0,codepage=850 0 0none /proc proc defaults 0 0/dev/hda6 /usr ext3 defaults 1 2/dev/hda8 swap swap defaults 0 0#none /mnt/hd supermount dev=/dev/hdb1,fs=ext2:vfat,--,kudzu,iocharset=iso8859-1,codepage=850 0 ZZnone /mnt/hd supermount dev=/dev/hdb1,fs=ext2:vfat,--,iocharset=iso8859-1,codepage=850,kudzu 0 0

Link to comment
Share on other sites

This is what your fstab should look like after editing.

/dev/hda5 / ext3 defaults 1 1none /dev/pts devpts mode=0620 0 0/dev/hda7 /home ext3 defaults 1 2none /mnt/cdrom supermount dev=/dev/scd0,fs=udf:iso9660,ro,--,iocharset=iso8859-1 0 0none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,sync,iocharset=iso8859-1,umask=0,codepage=850 0 0none /proc proc defaults 0 0/dev/hda6 /usr ext3 defaults 1 2/dev/hda8 swap swap defaults 0 0# none /mnt/hd supermount dev=/dev/hdb1,fs=ext2:vfat,--,kudzu,iocharset=iso8859-1,codepage=850 0

Or alternatively

/dev/hda5 / ext3 defaults 1 1none /dev/pts devpts mode=0620 0 0/dev/hda7 /home ext3 defaults 1 2none /mnt/cdrom supermount dev=/dev/scd0,fs=udf:iso9660,ro,--,iocharset=iso8859-1 0 0none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,sync,iocharset=iso8859-1,umask=0,codepage=850 0 0none /proc proc defaults 0 0/dev/hda6 /usr ext3 defaults 1 2/dev/hda8 swap swap defaults 0 0

My own preference is to use the comment out approach where possible. Makes it easy to fix/restore changes later.PS: You also left an extra "ZZ" in the file. Did not press Esc to exit Insert Mode before exiting vi.PPS: You may find it easier to edit with kedit.$ su# kedit /etc/fstabIt is very similar to notepad.

Link to comment
Share on other sites

I did comment out the line Owyn and saved the file correctly but upon reboot Mandrake recreates the line.

#none /mnt/hd supermount dev=/dev/hdb1,fs=ext2:vfat,--,kudzu,iocharset=iso8859-1,codepage=850 0 none /mnt/hd supermount dev=/dev/hdb1,fs=ext2:vfat,--,iocharset=iso8859-1,codepage=850,kudzu 0 0

Link to comment
Share on other sites

Jodef:That mount profile in fstab looks strange anyway.I would normally mount to /mnt./hdb1 not /mnt/hdAlso seems prepared to handle just about any contingency.After you the fstab problem cleaned up, try$ su# cd /mnt# mkdir hdb1# mount /dev/hdb1 /mnt/hdb1# mountAnd report results.Just in case you actually want to use that partition again in the future from another distro.

Link to comment
Share on other sites

Owyn edited file again following your instructions saved the fstab after edit but before reboot here are the contents:

/dev/ide/host0/bus0/target0/lun0/part5 on / type ext3 (rw)none on /proc type proc (rw)none on /proc/bus/usb type usbfs (rw)none on /dev type devfs (rw)none on /dev/pts type devpts (rw,mode=0620)/dev/ide/host0/bus0/target0/lun0/part7 on /home type ext3 (rw)none on /mnt/cdrom type supermount (ro,dev=/dev/scd0,fs=udf:iso9660,--,iocharset=iso8859-1)none on /mnt/floppy type supermount (rw,sync,dev=/dev/fd0,fs=ext2:vfat,--,iocharset=iso8859-1,umask=0,codepage=850)/dev/ide/host0/bus0/target0/lun0/part6 on /usr type ext3 (rw)

On a reboot here are the contents:

/dev/hda5 / ext3 defaults 1 1none /dev/pts devpts mode=0620 0 0/dev/hda7 /home ext3 defaults 1 2none /mnt/cdrom supermount dev=/dev/scd0,fs=udf:iso9660,ro,--,iocharset=iso8859-1 0 0none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,sync,iocharset=iso8859-1,umask=0,codepage=850 0 0none /proc proc defaults 0 0/dev/hda6 /usr ext3 defaults 1 2/dev/hda8 swap swap defaults 0 0#none /mnt/hd supermount dev=/dev/hdb1,fs=ext2:vfat,--,kudzu,iocharset=iso8859-1,codepage=850 0#none /mnt/hd supermount dev=/dev/hdb1,fs=ext2:vfat,--,iocharset=iso8859-1,codepage=850,kudzu 0 0none /mnt/hd supermount dev=/dev/hdb1,fs=ext2:vfat,--,kudzu,iocharset=iso8859-1,codepage=850 0 0

Mandrake just keeps recreating entry.

Link to comment
Share on other sites

I did comment out the line Owyn and saved the file correctly but upon reboot Mandrake recreates the line.
#none /mnt/hd supermount dev=/dev/hdb1,fs=ext2:vfat,--,kudzu,iocharset=iso8859-1,codepage=850 0 none /mnt/hd supermount dev=/dev/hdb1,fs=ext2:vfat,--,iocharset=iso8859-1,codepage=850,kudzu 0 0

Hmmm.Do you have a desktop icon for the partition? Remove it if you do.Otherwise, try$ cd$ grep -r hdb1 * > grep1.txtand$ su# grep -r hdb1 /etc/* > grep2.txtand email me the txt files at owyn.tux at sympatico.ca
Link to comment
Share on other sites

The desktop icon is good thinking Owyn . . . Also did you first umount the partition before commenting it out ?Because this mounting I think started to happen because you made the partition in the MCC and said to mount it when ready, it looks like a good idea to go to the MCC, unmount the partition there . . and then do the changes in /etc/fstab . . . ( even better it would be if the MCC asks you if you want to write the changes to fstab . . that way you are sure it understands that it should not be that stubborn ;) );) Bruno

Link to comment
Share on other sites

Unable to mount it is not an option the only option that comes up is create.In details the mount point:/mnt/hdDevice:hdb1Type:ext2:vfatFormattedMountedHow exactly do I delete icon?

Link to comment
Share on other sites

Unable to mount it is not an option the only option that comes up is create.In details the mount point:/mnt/hdDevice:hdb1Type:ext2:vfatFormattedMountedHow exactly do I delete icon?
1) Please report output from$ mount2) To delete a desktop icon.Right-Click on icon.Select "Move to Trash" or "Delete" from context menu.
Link to comment
Share on other sites

Mountpoint /mnt/hd . . how did that come about ? And "Type:ext2:vfat" . . . ???;) Bruno
The whole entry looks strange.The only way I can figure out how it might be created would be to create a new partition in diskdrake, NOT format it, and ADD entry to fstab.
Link to comment
Share on other sites

Update Owyn when I right click not an option but icon disappears when I do umount but as before reappears on reboot.

Mountpoint /mnt/hd . . how did that come about ? And "Type:ext2:vfat" . . . ???
Guess Mandrake will have to answer that I don't know.DSL is installed on that partition.Edit as follows:Owyn only Dsl installed on that partition don't mind blowing it and reinstalling but pls guide me thru exactly how I should do it. Edited by jodef
Link to comment
Share on other sites

JodefFirst click on the icopn and unmount . . . then go to the MCC and click on the partition . . troggle to expert mode and choose unmount . . . . . then go to fstab and remove the offensive line . . . . then:# rm -rf /mnt/hdB) Bruno

Link to comment
Share on other sites

JodefFirst click on the icopn and unmount . . . then go to the MCC and click on the partition  . . troggle to expert mode and choose unmount . . . . . then go to fstab and remove the offensive line . . . . then:# rm -rf /mnt/hdB) Bruno
Bruno not logged in as root rightclick->unmount error only root can unmountI went to the konsole did su followed by umount /mnt/hd icon disappearsOn going to MCC diskdrake toggle to expert mode still no option to unmount the partition create only.
Link to comment
Share on other sites

JodefIn a consolesuumount /mnt/hdEdit fstabType reboot in a console . . and do not reboot through the menu ( which would restore previous session ;) );) Bruno

Link to comment
Share on other sites

none /mnt/hd supermount dev=/dev/hdb1,fs=ext2:vfat,--,kudzu,iocharset=iso8859-1,codepage=850 0 0
Jodef now I look again at that line . . that can' t be your DSL partition ( what partition is DSL on ? ) . . .it looks more like an extra external drive. . . . . as long as the drive stays plugged in it will add that line again at every boot because of "hotplugging" . . . . It mounts /dev/hdb1 and not /dev/hda1 on /mnt/hd. . ;) B) . . . .and hdb is a second HD . . ;)B) BrunoPS: just compaire that line to the ones for your floppy and cdrom . . . . .
Link to comment
Share on other sites

Jodef now I look again at that line . . that can' t be your DSL partition ( what partition is DSL on ? ) . . .it looks more like an extra external drive. . . . . as long as the drive stays plugged in it will add that line again at every boot because of "hotplugging" . . . .It mounts /dev/hdb1 and not /dev/hda1 on /mnt/hd. . . . . .and hdb is a second HD . .
That second harddrive is what DSL is on am absolutely positively sure of that it is mounted I can cd into the directory and I have confirmed dsl on that partition.
Link to comment
Share on other sites

Aaaaa . . so DSL is on hdb1 and not on hda1 . . got confused by the first post in this thread . . . .And the only partition on hdb is the DSL partition ? . . . let me think . . . ;) Bruno

Link to comment
Share on other sites

PART 2How come that second HD is in the fstab as if it were a removable device ? . . . Did you add that HD later ? Something very funny is going on here . . . . If you did add it later: . . remove the drive ( pull it out the case ) and boot and watch the nessages during boot . . then remove the line in fstab and reboot . . and watch the messages again, check fstab and the MCC to see that the drive is actually gone . . if yes: Shutdown and add the drive again ( is it extrenal or internal ? ) boot and watch the messages . . . . . at detecting new hardware you will get a dialog for adding the new drive . . . it should NOT be mounted on /mnt/hd . . that makes no sense . . it should not be mounted at all but just be /dev/hdb . . . ;) Bruno

Link to comment
Share on other sites

That harddrive was there all the time deleted Slackware and Knoppix they were on that harddrive to try lindows install which was a magnificent failure.Went back into Mandrake created a partition and formatted a for Dsl did Dsl install then this happened didn't touch fstab at all.First time went into fstab was to try and prevent this automounting.As I told Owyn don't mind blowing Dsl but guide me thru partitioning with diskdrake because something went terribly wrong.Could Lindows have screwed up file structure on drive?

Link to comment
Share on other sites

Could Lindows have screwed up file structure on drive?
Dunno . . but the "fs=ext2:vfat,--,kudzu,iocharset=iso8859-1,codepage=850 0 0" sure looks funny for a "normal" drive . . . . I would first do a umount in the console and then go in the MCC and delete all that is on hdb . . clean it out completely and recreate a ext2 partition for DSL . . . if after the creating it asks if it should write fstab you say NO . . . if it says it writes the new patition table, that is okay . . . . Don't reinstall DSL before we got this cracked . . ;) Bruno
Link to comment
Share on other sites

So you don't think if I delete and recreate the problem will go away.I have space on hda for PCLos but was holding off on the install until I figured out how to configure lilo after the install.Knoppix and Slackware to go back on hdb.

Edited by jodef
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...