Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, I wanted to set up Damn Small Linux on my thinclient. I have it already installed on hda2 (256mb internal flash). I plugged usb flash (2GB, sda1) and I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2011
    Posts
    1

    mounting disk on boot


    Hi, I wanted to set up Damn Small Linux on my thinclient. I have it already installed on hda2 (256mb internal flash). I plugged usb flash (2GB, sda1) and I wanted to move all /usr and /home dir so I have more space to install programs.

    I updated /etc/fstab with:

    /dev/sda1 /mnt/sda1 ext2 defaults 0 0

    then I symlinked /usr to /mnt/sda1/usr (/home -> /mnt/sda1/home

    but I cannot boot right now - look like sda1 is not mounted and then it can't execute some script from /usr/bin.

    Is it possible to move /usr /home folder to different partition that is not bootable (in grup hda1 is used as the boot partition)?

    Or is there any way to force installing .deb packages to /home folder instead of /usr?

  2. #2
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    Hello and Welcome.
    You mentioned both sda and hda, your system only uses one or the other. That could be your problem. If you think it might be something else then post the output of
    Code:
    fdisk -l
    Code:
    cat /etc/fstab
    Be sure to use sudo or root as needed.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  3. #3
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Well, you can have hda and sda, if your kernel is old enough (pre 2.6.8, I think) - in those cases, hda=IDE and sda=SCSI (to include SATA, USB, RAID, etc.).

    Your problem is probably that the call to mount external devices (USB drive) does not happen until after system initialization is completed, and for that to happen, the /usr file system needs to be in place - i.e., you can't have /usr on an "auxiliary" drive.

    If this is an embedded system, are there perhaps things you can clean up in /usr, to make room? For example, do you need /usr/share/doc? To get an idea of what is taking up space, you can do:
    Code:
    cd /usr/share
    du -sm *|sort -n
    You can also do a listing of your packages, sort them by size, and remove any heavy-hitters that are unnecessary to your system.

    As for /home, you should be able to move that to your USB drive, provided that no startup scripts or anything are trying to access user data (anything in /home/*).

    A hard-core approach would be to chroot your environment to an entire new filesystem located on the USB drive - I did this for one embedded system. It worked fine, but was a bear to set up initially. See pivot_root.

Posting Permissions

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