You are not logged in.

#1 2012-11-24 16:51:04

lesto
Member
Registered: 2010-07-13
Posts: 107

one installation, two home (one is fallback)

Hi,
i'm going to install arch linux on an old Netbook, without much space.
I want to use an external HHD to make space for my file and application, so i'm gonna move /home and all possible folder on the external hard disk.

but sometimes i need to hang around with this netbook, so i want the system to be completely independent from the external hard disk.

basically this is the idea:
1. basic installation of full system on the netbook
2. low level copy of some folder (/home, /var and so on)
3(plan a). a special "fstab" or "/boot" will try to mount filesystem from external HHD, if fail it will load from intenal HHD
3(plan b). a script that will check presence of the HHD, unmont local FS and mount external FS (i like this because with the script and some UDEV rule i can fallback to internal HHD when external HHD is requested to be unmount, so i can unmount external HHD "on the fly")


There is something like this, maybe a plan c?
if something like this doesn't exist, then it has to be done!

Maybe will be possible to swap not only data, but entire OS between different PC with the same base installation and architecture
think at work, on the machines will be installed only the basic OS just to use the PC in case of "emergency" like basic connectivity (browser, text editor), and when needed you can mount your personal HHD with your file AND your program

Last edited by lesto (2012-11-24 16:52:38)

Offline

#2 2012-11-25 00:57:48

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,675

Re: one installation, two home (one is fallback)

Why not just link directories from the home directory on your internal drive e.g. a link to a folder Data on the external? Then your basic config files will always be available.

Just not sure why you want to do it in a way which sounds complex and error-prone. (But maybe that's just me.)


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#3 2012-11-25 01:42:08

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 14,751
Website

Re: one installation, two home (one is fallback)

Plan C, just create two user accounts - one with a home directory on the external drive, and another "minimal" user account on the internal drive.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#4 2012-11-25 22:13:22

lesto
Member
Registered: 2010-07-13
Posts: 107

Re: one installation, two home (one is fallback)

nope, also program (/var, /usr etc..) is different, not only home folder

Why not just link directories from the home directory on your internal drive e.g. a link to a folder Data on the external?

i like this, but i have to merge the contents of the folder...

Offline

#5 2012-11-25 22:22:16

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 14,751
Website

Re: one installation, two home (one is fallback)

So, you want different home directories and different usr directories?  What do you want shared, as this makes two very different systems.  Would you share var?  If so your logs would quickly get all messed up as they would not be logging the system you were actually using as soon as you changed out /home and /usr.

Why not just have independent systems on each drive?


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#6 2012-11-25 23:39:15

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,675

Re: one installation, two home (one is fallback)

Just for one thing, updates are going to completely screw your system if you do this.

I second Trilby's suggestion: just have independent systems.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#7 2012-11-25 23:42:58

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: one installation, two home (one is fallback)

Yeah, you know that Arch takes up bery little space as a base install.  I think what you actually want are two very minimal systems that share the same home folder... or something.  I am still kind of confused, but I think that is what you are after.

Offline

#8 2012-11-26 08:30:35

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: one installation, two home (one is fallback)

lesto wrote:

nope, also program (/var, /usr etc..) is different, not only home folder

Ya, you can not do this.... well I mean you 'Could' but it would be all wacky and prone to problems.

The best thing to do would be to add a line to fstab.

/dev/sdb1         /home/user/Data         ext4        rw,nosuid,noexec,noatime,errors=remount-ro    0 2

OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

Board footer

Powered by FluxBB