Results 1 to 5 of 5
I'm trying to build a custom setup that requires a flash drive and a CD to both be mounted to root. Applications, boot data, and other static directories are on ...
- 05-16-2010 #1Just Joined!
- Join Date
- May 2010
- Posts
- 3
Mounting multiple devices to root
I'm trying to build a custom setup that requires a flash drive and a CD to both be mounted to root. Applications, boot data, and other static directories are on the CD, while /home, /opt, and /tmp are on the flash drive. Is there a special option I can enter into fstab to allow this? If not, I intend to modify my kernel to allow this, but I'll need to find the sources that control this function. Any help is appreciated.
- 05-17-2010 #2Just Joined!
- Join Date
- May 2010
- Posts
- 5
As per my knowledge, I don't think this is possible. Because each device require a unique mount point.
- 05-17-2010 #3Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
There is only 1 root mount point, excepting for chroot'd users/applications, which is not what you are asking, from what I can tell. You can create mount points on / (which can be in ramdisk) for /boot, /usr, /var, etc which can then be associated with directories on the CD and directories or partitions on the flash drive. If you think you are going to modify the kernel to do this, I doubt that you have any idea of what you are getting yourself into...
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 05-17-2010 #4
There is only one '/' directory. That's what makes it the root. I think you want to mount various partitions on directories that are sub-directoies of the root. This is done routinely. Look in /etc/fstab for some likely examples.
man fstab
man mount
example
This assumes your flash is formatted in a filesystem type known to the kernel, and that your flash block device is /dev/sdb. You can probably figure out what it is byCode:mkdir /flash mount /dev/sdb1 /flash ls -l /flash
--- rod.Code:fdisk -l
Stuff happens. Then stays happened.
- 05-18-2010 #5Just Joined!
- Join Date
- May 2010
- Posts
- 3
Would it be easier to change where it looks for those directories? Like maybe /flash/home/username and /flash/tmp, or something along those lines
EDIT: Never mind, I found an option in fstab that allows me to do exactly what I want. With the bind option, I can mount /mnt/flash/home to /home and /mnt/flash/tmp to /tmp. Thanks for the replies!


Reply With Quote