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
 

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

reply to topic new topic new poll
Topic: persistent home|opt, confusing me< Next Oldest | Next Newest >
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Mar. 18 2005,22:13 QUOTE

I'm attempting to utilize a persistent opt and home, hopefully without the need to create yet another partition.

My setup...
hda1: Slackware
hda2: swap
hda3: Suse
hda4: DSL (KNOPPIX/ and boot/...poorman? frugal?)
grub loads all from hda, /boot is on hda3
All systems have 1001.50 as my main user

My first test was to create 'opt' on hda4, next to the DSL files.  Created a test file in this opt (hda4/opt/testing).
Booted DSL with 'opt=hda4'.
After boot, /opt was available in / rather than /ramdisk, with all the usual opt files but no 'testing'.
'testing' was found in /cdrom/opt, as it would with a typical boot.
/etc/mtab listed /mnt/hda4/opt mounted at /opt.

This almost makes sense, even though it was not was I was hoping for.  I assume there is an issue with using opt on a partition which is already mounted....that's logical, and would probably not happen if i used a fifth partition.  What I don't understand is just what the heck is /mnt/hda4?  It's not the same as /dev/hda4, which is where KNOPPIX is located.  I go into /mnt/hda4 and all i see is the opt directory created by DSL, and after shutdown, it's gone.  So I'm thinking /mnt/hda4 was something created in RAM?  If so it's no different than using /ramdisk/opt (or maybe it's worse, having less RAM to use?).

So I'm a little confused....do i need to create another partition in order to use a persistent opt?  Can I create a subdirectory on one of the other partitions and use that as opt in DSL?
e.g. opt=hda3/home/dsl/opt


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: Mar. 19 2005,00:05 QUOTE

/devhda4 is the name of the block device for partition number 4 on your first (Master) IDE device, usually your hard drive.

/mnt/hda4 is the mountpoint that is associated with this device and is automatically generated by knoppix and DSL during bootup.

So to make a short story long,

/dev/hda4 = something that you should not need to play with

/mnt/hda4 = the directory that contains the contents of your hard drive partition number 4 on your IDE master drive.

knoppix and dsl both work this way.

In fact, if you boot up with knoppix and go to /mnt/hda4 with your file manager (click on the hda4 icon), you will see the same files that you see when you look at it with the DSL file manager (assuming that the device has already been "mounted" by you).
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Mar. 19 2005,00:39 QUOTE

I understand the mountpoints thing....however, since /dev/hda4 is already mounted as /, it does not display as such when it is mounted again as /mnt/hda4.  The contents are only the test /opt i made.

I found a better way to do this anyway...at least better for me...
I'm not using the opt and home boot options.

I created a home and opt in hda3/home/dsl (suse system) and filled them with all the appropriate files, including additional programs and configs.
Next i added this to bootlocal.sh, and put only this one file in filetool.lst:
Code Sample
mount /dev/hda3
ln -sf /mnt/hda3/home/dsl/opt /
rm -rf /ramdisk/opt/
ln -sf /mnt/hda3/home/dsl/home /
rm -rf /ramdisk/home/


Now /opt and /home are linked into hda3/home/dsl, and the ones in /ramdisk are deleted.  I now have a persistent home and opt which do not require an additional partition, do not get overwritten on boot, and i no longer need to concern myself with backups.  Additionally it is a poorman install, so upgrading is cake....and i save a bit of RAM....and i can reuse the same installation in any other configuration via boot options, such as a vanilla DSL for testing extensions.

EDIT:  After seeing the inconvenience of jumping between drives using the link, i'm thinking it might be better to use mount instead, although i haven't tried it yet:
Code Sample
rm -f /{opt,home}
mkdir /{opt,home}
mount /dev/hda3
mount --bind /mnt/hda3/home/dsl/opt /opt
mount --bind /mnt/hda3/home/dsl/home /home
rm -rf /ramdisk/{opt,home}/

EDIT2:  The second version works much better.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
2 replies since Mar. 18 2005,22:13 < Next Oldest | Next Newest >

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

 
reply to topic new topic new poll
Quick Reply: persistent home|opt

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