(Semi-Newbie!) Installing to the /home partition on an EeePC

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

(Semi-Newbie!) Installing to the /home partition on an EeePC

Postby Chaz GELF » Fri Aug 24, 2012 7:18 am

Alright, here's the situation: I have an Asus EeePC 901 netbook, which I use mostly for surfing the web, but also want to use for other things like playing games (Just basic games to keep me distracted when I'm on holiday away from my main PC) and what have you.

Right now I have Crunchbang Linux installed on the system, it's a nice lightweight distro, and there was an easy enough tutorial on how to set up the partitions specifically for my EeePC, using the 4GB partition to install the operating system itself, and the 16GB partition as the /home directory.

Now, here's where I run into issues: Whenever I install something through the package manager, it always installs into the partition where I installed the distro itself, rather than into the home directory. This means that comparatively massive 16GB of space isn't getting used, while the distro's partition is getting clogged up with my programs.

I'm probably missing something really obvious here, but how do I tell my package manager to install programs into the /home directory instead?
User avatar
Chaz GELF
 
Posts: 3
Joined: Fri Aug 24, 2012 7:06 am
Location: Aberdeenshire

Postby nelz » Fri Aug 24, 2012 8:00 am

You don't, packages are installed into system directories, such as /usr. However, there is a quick and dirty workround.

Boot from a live distro, you cannot not do this while using the system. Mount your two filesystems, I assume they are /dev/sda1 for / and /dev/sdb1 for /home

Code: Select all
mkdir -p /mnt/{root,home}
mount /dev/sda1 /mnt/root
mount /dev/sdb1 /mnt/home


Then move the whole usr directory to the home filesystem and create an empty directory in its place

Code: Select all
mv /mnt/root/usr /mnt/home/
mkdir /mnt/root/usr


Now add a line to /etc/fstab to bind mount usr from the new location to the old.

Code: Select all
/home/usr /usr bind defaults,bind 0 0


This must be after the line mounting /home.

You could repartition the second drive and create a proper partition for /usr and mount that in fstab, and a purist would say you should, but this should work with less effort.

The system doesn't care where the files in /usr actually reside, only that they are accessible through the /usr path.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8469
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby Chaz GELF » Fri Aug 24, 2012 8:26 pm

nelz wrote:You could repartition the second drive and create a proper partition for /usr and mount that in fstab, and a purist would say you should, but this should work with less effort.

The system doesn't care where the files in /usr actually reside, only that they are accessible through the /usr path.


This seems like the better option for the long run, and I have no problems with reinstalling this OS or another one (Probably Easypeasy since that's much better suited to netbooks), as all of my important files are on my main desktop.

Could you suggest a good partition layout for me, in that case? The main issue I come up against when trying to partition both drives is the swap space. Almost every place that has a tutorial for setting up Linux on a netbook says that swap space is bad because it wears out the SSD more quickly.

To clarify, the EeePC 901 I have has got two drives:
SCSI2 (0,0,0) (sda) - 4.0 GB ATA ASUS-PHISON SSD
SCSI2 (0,1,0) (sdb) - 16.1GB ATA ASUS-PHISON SSD
User avatar
Chaz GELF
 
Posts: 3
Joined: Fri Aug 24, 2012 7:06 am
Location: Aberdeenshire

Postby heiowge » Fri Aug 24, 2012 8:50 pm

Why not install to the 16GB drive with something like 8GB for / and the rest for home. Disable swap and have the 4GB for extra storage formatted the same way as the other drive.
i5 4440 3.1Ghz, Asus H87M-E motherboard, 8GB DDR3, 2GB DDR5 nVidia card, 2x500GB Seagate hd, Coolermaster 750W PSU running Mint 16 MATE and Win7

eeepc 1015PX, 1.66 Ghz Intel atom processor, 2 GB DDR3, 320 GB hd, Mint 14 MATE. Fan needs fixing.
User avatar
heiowge
LXF regular
 
Posts: 1905
Joined: Wed Feb 27, 2008 8:21 pm
Location: Cheshire, UK

Postby Chaz GELF » Fri Aug 24, 2012 9:04 pm

You know, I have no idea why I didn't think of that before! I always installed the OS to the 4GB drive in part because it made the most sense to me, and in part because I heard that drive was faster than the 16GB drive. Really, though, I don't need to worry so much about drive speed since the netbook is just an occasional-use system.

Thanks, that's cleared all that up for me!
User avatar
Chaz GELF
 
Posts: 3
Joined: Fri Aug 24, 2012 7:06 am
Location: Aberdeenshire

Postby nelz » Fri Aug 24, 2012 9:35 pm

When I had a 901 I cheated and used LVM to combine the two drives :D
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8469
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby heiowge » Sat Aug 25, 2012 7:31 am

My mum bought one of the old 900 series - the one with windows and 8GB missing from the drive. When she started having issues with windows, I ended up installing Lubuntu to the 8GB drive and left Windows on the 4GB and she had a 1GB /home and an 8GB SDHC card for storage.
i5 4440 3.1Ghz, Asus H87M-E motherboard, 8GB DDR3, 2GB DDR5 nVidia card, 2x500GB Seagate hd, Coolermaster 750W PSU running Mint 16 MATE and Win7

eeepc 1015PX, 1.66 Ghz Intel atom processor, 2 GB DDR3, 320 GB hd, Mint 14 MATE. Fan needs fixing.
User avatar
heiowge
LXF regular
 
Posts: 1905
Joined: Wed Feb 27, 2008 8:21 pm
Location: Cheshire, UK


Return to Help!

Who is online

Users browsing this forum: nelz and 2 guests