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 ...
- 10-05-2011 #1Just 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?
- 10-05-2011 #2
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
Be sure to use sudo or root as needed.Code:cat /etc/fstab
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.
- 10-05-2011 #3Linux Guru
- Join Date
- May 2011
- Posts
- 1,838
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:
You can also do a listing of your packages, sort them by size, and remove any heavy-hitters that are unnecessary to your system.Code:cd /usr/share du -sm *|sort -n
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.


Reply With Quote