Find the answer to your Linux question:
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 ...
  1. #1
    Just 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.

  2. #2
    Just 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.

  3. #3
    Linux Guru Rubberman's Avatar
    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!

  4. #4
    Linux Newbie theNbomr's Avatar
    Join Date
    May 2007
    Location
    BC Canada
    Posts
    150
    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
    Code:
    mkdir /flash
    mount /dev/sdb1 /flash
    ls -l /flash
    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 by
    Code:
    fdisk -l
    --- rod.
    Stuff happens. Then stays happened.

  5. #5
    Just 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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...