You are not logged in.

#1 2012-02-14 00:52:22

Blackened Justice
Member
Registered: 2012-02-11
Posts: 19

Questions about partitioning

Hey everyone,

I'm currently in the process of backing up my data, in order to completely redo my partitioning scheme. Right now I have the following scheme, ordered by their place in the disk:

/dev/sda5 -> 4 GB swap
/dev/sda7 -> 30 GB ext4 / for Linux 1
/dev/sda8 -> 30 GB ext4 / for Linux 2
/dev/sda6 -> the rest of the 500 GB disk, ext4 /home for both

I wanted to redo it to something like this:

/dev/sda5 -> 1 GB ext2, /boot
/dev/sda6 -> 4 GB swap
/dev/sda7 -> 200 GB ext4, to be mounted under /mnt/Files, and symlinked to ~/Documents, Music, etc.
/dev/sda8, sda9, sda10, etc. -> rest of the disk, ext4 / for various Linux and possibly BSD distros.

Is something like this correct and optimized? I see a lot of places recommending having a separate /boot partition, I'm going to give it a try. ext2 seems to be well regarded in this aspect, would I gain anything from making it ext4? Is 1 GB too large?

Regarding the order on the disk, should I have it like that, or maybe /boot, then /mnt/Files, then swap, then the OSs? What is a generally good order for this sort of stuff?


Cheers

EDIT: Forgot to mention: the layout posted above would all be on an extended partition, on /dev/sda1. Would I gain anything if I made any ot the partitions primary?
EDIT2: Also, should I look into LVM? Would it interest me?

Last edited by Blackened Justice (2012-02-14 01:03:51)

Offline

#2 2012-02-14 01:14:32

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Questions about partitioning

Blackened Justice wrote:

I see a lot of places recommending having a separate /boot partition, I'm going to give it a try. ext2 seems to be well regarded in this aspect, would I gain anything from making it ext4? Is 1 GB too large?

Yes.

Arch Wiki wrote:

A /boot partition requires only about 100MB.

Your filesystem choice for /boot is dependent on your bootloader: legacy grub only boots from ext2, grub2 can boot from ext{2,3,4} as does syslinux. Note: the grub2 support for ext4 carries a warning on that page; you'll want to read that first.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2012-02-14 02:44:16

Blackened Justice
Member
Registered: 2012-02-11
Posts: 19

Re: Questions about partitioning

I realize the Wiki says that, but I've seen users reporting that that may be a bit too small if I want to experiment with various kernels and such. If I want to be able to boot into various OSs, with hypothetically different kernels, I'd need to have more space, right?

Offline

#4 2012-02-14 04:57:28

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

Re: Questions about partitioning

If you've backed your data up, then do it however you want. It is better to seek forgiveness than ask permission.

Offline

#5 2012-02-14 07:26:50

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: Questions about partitioning

Blackened Justice wrote:

EDIT2: Also, should I look into LVM? Would it interest me?

LVM is definitely worth it, should you ever want/need to do some resizing/repartitioning operation again. The ArchWiki has a decent article about how to set it up.

Last edited by Gcool (2012-02-14 07:32:53)


Burninate!

Offline

#6 2012-02-14 07:28:21

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Questions about partitioning

1 GB for the boot partition is way too much, yeah... 30-50 MB should be enough. I'd probably make it an even 100 MB and be done with it. Right now I don't have a separate /boot partition because I only dual boot with Windows.

You should know that if you put them on primary partitions they'll start from 1 (sda1, sda2, etc) instead of 5. You're also limited to 4 primary partitions, so choose wisely... For instance, why do you need a swap partition in the first place? Hibernation? I have 2 GB of RAM, which barely (if ever) gets above 70% in Conky. And I run a lot of virtual machines.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#7 2012-02-14 22:37:56

Blackened Justice
Member
Registered: 2012-02-11
Posts: 19

Re: Questions about partitioning

Hmm, I guess I planned on having a swap because it's customary, I thought it was pretty much standard wink I have 3 GB of RAM, and it does sometimes get a bit too filled up when I run certain VMs.

A question: Just how exactly would I have several distributions running from the same /boot? I have some knowledge of playing with grub's menu.lst, making it point to different kernels and such, but I've never tried to have different distros on the same /boot... Would I just rename the initramfs-linux.img, initramfs-linux-fallback.img and vmlinuz-linux to something different, and then adjust menu.lst accordingly? How about running different distros from the same kernel?

Offline

#8 2012-02-14 22:51:58

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Questions about partitioning

You really should read the wiki page on grub https://wiki.archlinux.org/index.php/GRUB


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2012-02-14 22:55:09

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Questions about partitioning

jasonwryan wrote:

legacy grub only boots from ext2

Not true, legacy grub boots from ext3 and ext4 as well.

Offline

#10 2012-02-14 23:06:04

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Questions about partitioning

Gusar wrote:
jasonwryan wrote:

legacy grub only boots from ext2

Not true, legacy grub boots from ext3 and ext4 as well.

My bad. Not sure where I picked that up. Thanks for the correction.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#11 2012-02-14 23:52:43

Blackened Justice
Member
Registered: 2012-02-11
Posts: 19

Re: Questions about partitioning

jasonwryan wrote:
Gusar wrote:
jasonwryan wrote:

legacy grub only boots from ext2

Not true, legacy grub boots from ext3 and ext4 as well.

My bad. Not sure where I picked that up. Thanks for the correction.

Any particular reason for it to be ext2 instead of ext4 in many systems?

Offline

#12 2012-02-14 23:59:08

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Questions about partitioning

Blackened Justice wrote:

Any particular reason for it to be ext2 instead of ext4 in many systems?

People probably continue doing it without having a clue why. I think it was about the journal, in ext3 you can't disable it. As to what the wisdom was behind the "no journal on the /boot partition" mantra, I have absolutely no clue. Even so, ext4 can be instructed not to use a journal, so there's no reason whatsoever to not use ext4.

Offline

#13 2012-02-15 00:07:02

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

Re: Questions about partitioning

Blackened Justice wrote:

Any particular reason for it to be ext2 instead of ext4 in many systems?

I seem to recall once I had trouble booting when /boot was ext4. I stfwed and read that for an ext4 /boot, you either need ext4 compiled in, or you need to pass an extra flag to the kernel.

This seemed like a lot of bother and I've just used ext2 for /boot ever since.

Offline

#14 2012-02-15 01:55:12

Blackened Justice
Member
Registered: 2012-02-11
Posts: 19

Re: Questions about partitioning

Well, I've been searching around for stuff, and this was quite a valuable read:
http://www.linuxquestions.org/questions … on-698193/
Now I just have to read up on LVM and see if it suits me/is worth it wink

Offline

#15 2012-02-16 19:46:27

Blackened Justice
Member
Registered: 2012-02-11
Posts: 19

Re: Questions about partitioning

Well, I have it up and running wink I have the following table right now:
/dev/sda1 -> /boot, 1 GiB
/dev/sda2 -> /boot.bak, 1 GiB
/dev/sda3 -> LVM partition, 300 GiB, where I have the following LVs: swap, 4 GiB, arch, 10 GiB, and mint, 10 GiB

I'm really enjoying the additional abstraction gained from LVM. Not really sure yet what to do with the boot backup partition, but it seemed like a good idea.

Cheers

Offline

#16 2012-02-16 20:11:31

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Questions about partitioning

So you went with 1 GB after all... Whatever. It's your system.

IMO, a "backup" boot partition is useless on the same drive because if the MBR gets screwed, the backup partition is effectively made redundant. Just keep a bootable USB stick around (2-4 GB ones are dirt cheap) with a "Live" Linux distribution like Parted Magic, Ubuntu or even Arch.


PS: I still think that 1 GB is overkill. Seriously, what are you planning on filling it up with? Bitmap splash screens?

Last edited by DSpider (2012-02-16 20:14:13)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#17 2012-02-16 21:04:23

Blackened Justice
Member
Registered: 2012-02-11
Posts: 19

Re: Questions about partitioning

I do have a couple of live USB sticks, that wouldn't be a problem. The 1 GiB seems like a good size to keep the kernels and initramfs for multiple distros.

Offline

#18 2012-02-16 21:55:21

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

Re: Questions about partitioning

Blackened Justice wrote:

The 1 GiB seems like a good size to keep the kernels and initramfs for multiple distros.

How many is multiple?  I keep my two previous arch kernels and initrams on my 100MB /boot, and I have 50+ Megs to spare.  OTOH, I have an entire "recovery partition" - a complete Arch install - on a 1GB partition.


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

Board footer

Powered by FluxBB