[conspire] Comments on setting up disk partitions.

Paul Zander paulz at ieee.org
Tue Apr 7 23:37:42 PDT 2009


To summarize, I understand Rick to be suggesting partitions set up like:


		
	

	
	
		
			/dev/sda1
			300
			NTSF
			/windows
		
	
	
		
			/dev/sda2
			2
			swap
			n/a
		
	
	
		
			/dev/sda3
			100
			ext3
			/
		
	
	
		
			

			98
			

			None – un allocated
		
	
	
		
			total sda
			500
			

			

		
	
	
		
			

			

			

			

		
	
	
		
			/dev/sdb1
			2
			swap
			n/a
		
	
	
		
			/dev/sdb2
			100
			ext3
			/usr
		
	
	
		
			

			98
			

			None – un allocated
		
	
	
		
			total sdb
			200
			

			

		
	
	
		
			

			

			

			

		
	
	
		
			/dev/sdc1
			2
			swap
			n/a
		
	
	
		
			/dev/sdc2
			20
			ext3
			/var
		
	
	
		
			

			98
			

			None – un allocated
		
	
	
		
			total sdc
			120
			

			

		
	


What I would want to change is to also partition the Windoz stuff.  The basic XP only takes about 6 GB.   Keeping data in separate partitions makes it easier to identify what to back up, and also makes it a bit more tolerant of system crashes.  (See my comments in the original posting.)

So, I would follow the suggestions for the Linux partitions, but reduce the size of /windows and add some more NTFS partitions.  As a result, when running either OS, there are things on all 3 disks, so some head seeks can happen in parallel.  Also important files are backed up on a different hard drive.


		
	

	
	
		
			

			

			

			Linux mount
			drive
		
	
	
		
			/dev/sda1
			20
			NTSF
			/windows
			C:
		
	
	
		
			/dev/sda2
			2
			swap
			n/a
			

		
	
	
		
			/dev/sda3
			100
			ext3
			/
			

		
	
	
		
			/dev/sda4
			200
			NTSF
			/win_data_backup
			yes
		
	
	
		
			/dev/sda5
			150
			ext3
			<Linux_backup>
			

		
	
	
		
			rest
			28
			--
			None – un allocated
			

		
	
	
		
			total sda
			500
			

			

			

		
	
	
		
			

			

			

			

			

		
	
	
		
			/dev/sdb1
			2
			swap
			n/a
			

		
	
	
		
			/dev/sdb2
			100
			ext3
			/usr
			yes
		
	
	
		
			/dev/sdb3
			30
			NTSF
			/win_aps
			yes
		
	
	
		
			/dev/sdb4
			50
			NTSF
			/win_data_1
			yes
		
	
	
		
			rest
			18
			--
			None – un allocated
			

		
	
	
		
			total sdb
			200
			

			

			

		
	
	
		
			

			

			

			

			

		
	
	
		
			/dev/sdc1
			2
			swap
			n/a
			

		
	
	
		
			/dev/sdc2
			20
			ext3
			/var
			

		
	
	
		
			/dev/sdc3
			30
			NTSF
			/win_data_2
			yes
		
	
	
		
			/dev/sdc4
			50
			

			/win_backup_2
			yes
		
	
	
		
			rest
			18
			--
			None – un allocated
			

		
	
	
		
			total sdc
			120
			

			

			

		
	


Paul


--- On Tue, 4/7/09, Rick Moen <rick at linuxmafia.com> wrote:
From: Rick Moen <rick at linuxmafia.com>
Subject: Re: [conspire] Comments on setting up disk partitions.
To: conspire at linuxmafia.com
Date: Tuesday, April 7, 2009, 10:43 AM

Quoting Paul Zander (paulz at ieee.org):

> My basic question is what disk partitions to set up on a new desktop.
[...]
> The new machine has three hard drives:
> o  new 500 GB  SATA
> o  used 200 GB IDE  (has partitions from previous Linux install, but
it's 
>         time to update the OS)
> o  used 120 GB IDE (has some partitions with data files, and also what
>    was C: which can now be re-purposed.)
[...]
> It would be really nifty to have Thunderbird set up to run on both
> OS's but share the same email data files.  

It's important determine which drive you can (and wish to) boot from,
for two reasons:  1.  MS-Windows will want to be on an NTFS filesystem
("partition"), there, i.e., it really likes to be on the first
primary
partition on the first drive recognised in the BIOS.  2.  The booting
process will be controlled from that drive.  Boot sequence thus goes:

1.  BIOS branches to
2.  Microsoft unnamed program in the first drive's MBR, branches to
3.  First stage of GRUB in first sector of /dev/sda2[1] (second filesystem
    of the first physical drive, a native-Linux ext3-formatted 
    filesystem; /dev/sda1 being a huge honking NTFS partition for
    MS-Windows).  GRUB presents you with the "What do you want to
boot?"
    screen, with a countdown to whatever OS you'll set up as default,
    Windows of Linux.  Depending on which you pick at boot time, 
    branch to either:

3a. Remainder of GRUB's code in /dev/sda2, which finds the kernel, 
    loads it with instructions about where to find the root filesystem,
    and there you go.   The kernel reads /etc/fstab ("FileSystem
Table")
    to locate the other filesystems, mounts them during startup.

or

3b. First sector of /dev/sda1, where Microsoft's OS Loader program
    takes over, locating the NT kernel and all that other stuff. 

Machine BIOSes' boot routines are idiosyncratic, so you should consider 
checking to see which drive(s) you can boot from.  

And then, fortunately, you have gobs of space, so you can afford to (1)
be generous in your allocations and (2) keep it pretty simple, i.e., use
relatively few Linux partitions.

In fact, when people are starting out and don't have well-developed
opinions on partitioning, I urge them to lean towards the simple.  You
can always back up your data and redo the filesystems, when you have a
clearer idea what you want to accomplish.

You can use the fact that the system has three physical drives to
increase Linux performance by reducing average drive seek time.
"Seeking", i.e., changing from one concentric track to another, is by
orders of magnitude the slowest operation a hard drive is called upon to
do, so anything you can do that decreases the average seek distance (and
thus seek time) is good.  One thing is thus to include a swap partition
on each drive.  Another is to split among the drives the parts of the
total Linux file tree that get the most seek activity on average, i.e.,
put all of /usr on one drive, /var on another, and /home on the third.


So, how about this (under the assumption that the SATA drive is first
in BIOS drive order):

500 GB  SATA "/dev/sda" divided up as:

Size     Type   Device      Mountpoint within Linux
300 GB   NTFS   /dev/sda1   /windows
  2 GB   swap   /dev/sda2   [not applicable]
100 GB   ext3   /dev/sda3   /
rest     -      -           None - unallocated space

200 GB "IDE" (PATA) /dev/sdb, divided up as 

Size     Type   Device      Mountpoint within Linux
  2 GB   swap   /dev/sdb1   [not applicable]
100 GB   ext3   /dev/sdb2   /usr
rest     -      -           None - unallocated space

120 GB "IDE" (PATA) /dev/sdc:
I'm a little confused, here.  You say it has "some partitions with
data
files".  If those are files you care about, you might want to boot the
Linux live CD of your choice (I like Sidux), mount those partitions, and
copy the files over to somewhere for safekeeping.[2]  Since you say
nothing about what kind of partitions, how large, etc., are on the
drive, and whether you want to keep them completely unchanged, or
alternatively want to keep the contents but are OK with blowing away the
partitions currently holding them, it's difficult to advise you.
Assuming you can copy those files away, and are willing to rebuild the
partition table:

Size     Type   Device      Mountpoint within Linux
   2 GB  swap   /dev/sdc1   [not applicable]
  20 GB  ext3   /dev/sdc2   /var
rest     -      -           None - unallocated space


There ya go.  Clean, easy to understand, avoids all the complexity of
"extended partitions" and "logical drives" by keeping
per-drive
filesystem count to four or fewer, and has room unallocated on each 
drive that can be deployed however needed, later.

You'll eventually regret at least part of whatever partitioning scheme
you start with -- but that'll be when you can think over how you'll
re-do it.  ;->


Personally, I like to use whatever is my favourite Linux live CD of the
moment to lay out partitions (edit the partition table) on each drive.
You could even establish there the definition of the /dev/sda1 space
that you'll later turn into NTFS when you install MS-Windows on it.
The Microsoft installer will format the target partition, so there's no
point in running mkfs.ntfs on it.  Just define /dev/sda1 to be 300 GB
and type 7 ("HPFS/NTFS"), which edits the partition table
appropriately
but doesn't mkfs ("format") the actual partition.

So, in your live CD, you can do

fdisk /dev/sda
...and lay out your partitions for it.  Save, exit.  Then

fdisk /dev/sdb
...and lay out your partitions for it.  Save, exit.  Then

fdisk /dev/sdc
...and lay out your partitions for it.  Save, exit.  Then

mkfs.ext3 /dev/sda3
mkfs.ext3 /dev/sdb2
mkfs.ext3 /dev/sdc2
mkswap /dev/sda2
mkswap /dev/sdb1
mkswap /dev/sdc1

...with the result that your data-bearing and swap partitions 
are now already defined and formatted (except that the MS-Windows 
one isn't formatted), even before you install your OSes.


But you don't _need_ to use a live CD.  Instead, you can (1) first,
install MS-Windows to /dev/sda1, and then (2) do all of the
above (or equivalent) in your chosen Linux distro installer.

Either way, remember that it's always advisable to install MS-Windows
_before_ other OSes on multiboot machines, because Microsoft makes no
effort to get along with others, and will without asking permission
overwrite your MBR, reset partition flags, etc.


As to your question about Thunderbird sharing e-mail data files across
OSes:  Last time this question came up, I think it was posed by Darlene 
Wallach, and I suggested using a symbolic link from the Linux side
pointing to the Windows-side files.  The user (Darlene or whoever) 
said it didn't work.  However, here's a different way:
http://lifehacker.com/348858/use-a-single-data-store-when-dual-booting

Note:  Referenced page talks about fetching and installing the
"ntfs-3g" 
tool.  That's often no longer needed, as many distros have been
incorporating ntfs3g.  The point about using that driver set is that, 
for the first time, it safely permits not only reading but also
_writing_ arbitrary files to NTFS partitions from Linux.  That had been
a longstanding problem, because Microsoft refuses to publicly document
the NTFS specification, and the Linux coders were obliged to
reverse-engineer it.


> It might be a good idea to have partitions to back up data on other
drives.

Well, you can either repurpose some of the unallocated space as
dedicated filesystems for that, or you can just create backup
subdirectories on the existing ones.  Footnote [2] gives tips on using
rsync (and other tools) for copying directory trees.

I'm sure there are things I'm forgetting, but I hope the above is
somewhat useful.


[1]  I change /dev/sda2 to /dev/sda3, further on, to insert swap.  Don't
    be confused.

[2]  If you need to move files around, just boot a live CD and use
rsync.  See:  "Copying Directory Trees" on
http://linuxmafia.com/kb/Admin .

_______________________________________________
conspire mailing list
conspire at linuxmafia.com
http://linuxmafia.com/mailman/listinfo/conspire
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://linuxmafia.com/pipermail/conspire/attachments/20090407/dd415b30/attachment.html>
-------------- next part --------------
_______________________________________________
conspire mailing list
conspire at linuxmafia.com
http://linuxmafia.com/mailman/listinfo/conspire


More information about the conspire mailing list