You are not logged in.

#1 2013-12-05 18:15:04

ThePacman
Member
From: Classified
Registered: 2013-09-19
Posts: 127

Smallest possible root partition?

I'm trying to remotely (SSH) convert a machine from Ubuntu Server to Arch Linux.

The owner of the machine does not have any external storage available (e.g., flash drives) - he switched over to using Apple products almost exclusively and has been using cloud services and such to store everything.

The machine's partition table currently looks like:

# fdisk -l

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000af6e3

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          501758   625141759   312320001    5  Extended
/dev/sda3       625141760   625142447         344   83  Linux
/dev/sda5          501760   625141759   312320000   8e  Linux LVM

Disk /dev/mapper/Pauls--Ubuntu--Server-root: 317.8 GB, 317785636864 bytes
255 heads, 63 sectors/track, 38635 cylinders, total 620675072 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/Pauls--Ubuntu--Server-root doesn't contain a valid partition table

Disk /dev/mapper/Pauls--Ubuntu--Server-swap_1: 2009 MB, 2009071616 bytes
255 heads, 63 sectors/track, 244 cylinders, total 3923968 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/Pauls--Ubuntu--Server-swap_1 doesn't contain a valid partition table
# parted /dev/sda print
sda   sda1  sda2  sda3  sda5  
james@Pauls-Ubuntu-Server:~$ sudo parted /dev/sda print
Model: ATA WDC WD3200AAJS-0 (scsi)
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End    Size   Type      File system  Flags
 1      1049kB  256MB  255MB  primary   ext2         boot
 2      257MB   320GB  320GB  extended
 5      257MB   320GB  320GB  logical                lvm
 3      320GB   320GB  352kB  primary    ext4

Would it be possible, via a creative combination of fstab and symlinks, to have a root partition of ~200 MB? What issues might arise?


Fedora believes in "software freedom" - that is, restricting user software choices to those deemed appropriately licensed by The Powers That Be.
Arch believes in "freedom", as well - the user has control over his or her system and can do what he wants with it.
https://fedoraproject.org/wiki/Forbidden_items | https://wiki.archlinux.org/index.php/The_Arch_Way

Offline

#2 2013-12-05 18:25:56

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,599

Re: Smallest possible root partition?

Depends on what you have on it. If /var, /home, /usr, /boot, /etc, and /opt are on on their own partitions, you could probably get away with a root that was just a few MB. Each of those that is on the root partition will add to the requirements, generally /etc doesn't take too much, /boot can, depending on how many kernels you have, and /opt depends completely on whether you use any programs that get installed there; I have none. /srv is something else to consider if you run apache or something.

Of course, putting /usr and /var on their own partitions creates some other challenges, and those will be two of your larger dirs.

Last edited by Scimmia (2013-12-05 18:27:51)

Offline

#3 2013-12-05 18:44:12

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Smallest possible root partition?

I have a testing system with 18M used on /

It uses separate /boot /usr /home and /var. tongue

Last edited by alphaniner (2013-12-05 18:44:39)


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#4 2013-12-05 19:00:23

ThePacman
Member
From: Classified
Registered: 2013-09-19
Posts: 127

Re: Smallest possible root partition?

Yeah, I'm going to have /usr /var, etc. {<pun} symlinked to some folders on sda3. I just wanted to get a sanity check first.

Last edited by ThePacman (2013-12-05 19:06:15)


Fedora believes in "software freedom" - that is, restricting user software choices to those deemed appropriately licensed by The Powers That Be.
Arch believes in "freedom", as well - the user has control over his or her system and can do what he wants with it.
https://fedoraproject.org/wiki/Forbidden_items | https://wiki.archlinux.org/index.php/The_Arch_Way

Offline

#5 2013-12-05 19:04:39

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Smallest possible root partition?

In my case, /var and /usr are on their own dedicated LVs and are mounted through fstab. I wouldn't assume this means symlinking them could work.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#6 2013-12-05 19:10:15

ThePacman
Member
From: Classified
Registered: 2013-09-19
Posts: 127

Re: Smallest possible root partition?

alphaniner wrote:

In my case, /var and /usr are on their own dedicated LVs and are mounted through fstab. I wouldn't assume this means symlinking them could work.

What I'm thinking is:
sda1 (ubuntu boot) mounted on /
sda3 (ubuntu root) mounted on /mnt

/usr -> /mnt/arch/usr
/var -> /mnt/arch/var
/etc -> /mnt/arch/etc
..and so on. Obviously the pacstrap will be the hard part (I'm thinking sshfs perhaps,) but the biggest question was "is it possible?"

It's looking doable so far.


Fedora believes in "software freedom" - that is, restricting user software choices to those deemed appropriately licensed by The Powers That Be.
Arch believes in "freedom", as well - the user has control over his or her system and can do what he wants with it.
https://fedoraproject.org/wiki/Forbidden_items | https://wiki.archlinux.org/index.php/The_Arch_Way

Offline

#7 2013-12-05 19:12:03

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,599

Re: Smallest possible root partition?

It's doable, but with symlinks like that? It *might* work but will break immediately as soon as the filesystem package is updated, plus it will stop working completely when Pacman 4.2 is released, it will not traverse symlinks to install files.

Offline

#8 2013-12-05 19:47:53

ThePacman
Member
From: Classified
Registered: 2013-09-19
Posts: 127

Re: Smallest possible root partition?

Scimmia wrote:

It's doable, but with symlinks like that? It *might* work but will break immediately as soon as the filesystem package is updated, plus it will stop working completely when Pacman 4.2 is released, it will not traverse symlinks to install files.

Yeah, it's not a permanent installation; just a temporary bootstrap while I get the real install on sda3.

Thanks for warning me about the shortcoming in that version of Pacman. I wonder why they'd do something like that?


Fedora believes in "software freedom" - that is, restricting user software choices to those deemed appropriately licensed by The Powers That Be.
Arch believes in "freedom", as well - the user has control over his or her system and can do what he wants with it.
https://fedoraproject.org/wiki/Forbidden_items | https://wiki.archlinux.org/index.php/The_Arch_Way

Offline

#9 2013-12-05 19:52:45

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,599

Re: Smallest possible root partition?

Discussion here: https://mailman.archlinux.org/pipermail … 16488.html

As mentioned in that thread, bind mounts are an option.

Last edited by Scimmia (2013-12-05 19:55:47)

Offline

#10 2013-12-05 20:54:36

ThePacman
Member
From: Classified
Registered: 2013-09-19
Posts: 127

Re: Smallest possible root partition?

Okay, it says that there's not enough free space. I know for a fact that there are hundreds of gigs available on sda3.

Would bind mounts instead of symlinks fix this?


Fedora believes in "software freedom" - that is, restricting user software choices to those deemed appropriately licensed by The Powers That Be.
Arch believes in "freedom", as well - the user has control over his or her system and can do what he wants with it.
https://fedoraproject.org/wiki/Forbidden_items | https://wiki.archlinux.org/index.php/The_Arch_Way

Offline

#11 2013-12-05 21:37:46

ThePacman
Member
From: Classified
Registered: 2013-09-19
Posts: 127

Re: Smallest possible root partition?

Ha! Got it working. sda1 is being pacstrapped now (in a VM with 10.0.2.2:/boot on /mnt and 10.0.2.2:/ on /mnt/mnt)

Everything seems to be working, but I keep seeing "warning: warning given when extracting {SOME_FILE} (Can't restore time)" - I'd imagine this has to do with the VM's time being off in relation to the host's time - is it safe for me to ignore this?


Fedora believes in "software freedom" - that is, restricting user software choices to those deemed appropriately licensed by The Powers That Be.
Arch believes in "freedom", as well - the user has control over his or her system and can do what he wants with it.
https://fedoraproject.org/wiki/Forbidden_items | https://wiki.archlinux.org/index.php/The_Arch_Way

Offline

Board footer

Powered by FluxBB