Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: mtab is overwritten - how is a second drive added?, Recognizing RW drives at boot< Next Oldest | Next Newest >
Malc Offline





Group: Members
Posts: 3
Joined: Nov. 2006
Posted: Nov. 28 2006,10:49 QUOTE

On my mandrake system I can add a second hardrive by editing /etc/mtab and adding a line such as
/dev/hdb1 /home rw 0 0
When the system reboots the drive is found mounted at the location in this case /home.

How is this done with DSL?  The problem found is that the line added to mtab is lost during the next boot.  /etc/mtab appears to be rewritten.

The DSL system used is the result of an hdinstall which followed the instructions found on the DSL opening html page (with the 300Mb partition).

It boots without a problem and the additional drive can be mounted manually with
mount /dev/hdb1 /home

The reason for adding the drive this way is so that any user data is kept on a separate drive to the operating system.

What is the method for adding a drive so that it is correctly added during boot?

Thanks
Malc
Back to top
Profile PM 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: Nov. 28 2006,13:58 QUOTE

I think you meant /etc/fstab , as mtab only lists mounted devices...

If you did a traditional debian-style hd-install, editing that fstab file should work instead.

If you did some frugal installation, booting with home= should work (might also work for a debian-style install too).
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: Nov. 28 2006,14:03 QUOTE

/etc/fstab will be rewritten upon a reboot.
Use the boot option nofstab to prevent this.
Back to top
Profile PM WEB 
Malc Offline





Group: Members
Posts: 3
Joined: Nov. 2006
Posted: Nov. 28 2006,16:35 QUOTE

Thanks for you replies and in reply here's what I tried.

edited /etc/fstab to add the line
/dev/hdb1 /home ext2 rw 0 0

edited /boot/grub/menu.lst, the DSL option used at boot
add 'home=/dev/hdb1' and 'nofstab' as parameters in the line
And noted that there is 'frugal' at the end of the line. (I'll look for info about frugal).

after boot
cat /etc/mtab
doesn't show /dev/hdb1 as mounted.
ls -al /home
doesn't show the user directory dsl that should be there
then
mount /dev/hdb1
finds /dev/hdb1 at /home in mtab and ls /home finds the dsl directory and files.

It seems that /etc/fstab is not used for mounting devices until after boot.  There's a script /etc/init.d/checkroot.sh that does something with mtab at the end of it.
Back to top
Profile PM 
Malc Offline





Group: Members
Posts: 3
Joined: Nov. 2006
Posted: Nov. 28 2006,16:59 QUOTE

Looking in the FAQs the section about VNC describes howto execute commands at boot.

Therefore add the line
mount /dev/hdb1 to the file /opt/bootlocal.sh

This was tested and now the second hard drive gets mounted at the correct mount point at boot.

Problem Solved and thanks for the the essential supporting tips.
Back to top
Profile PM 
6 replies since Nov. 28 2006,10:49 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: mtab is overwritten - how is a second drive added?

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code