[conspire] Comments on setting up disk partitions.

Rick Moen rick at linuxmafia.com
Wed Apr 8 15:26:06 PDT 2009


Quoting Paul Zander (paulz at ieee.org):

> This is what I attempted to convey:

Hmm, don't worry too much about it, but I suspect you're still embedding
a lot of tab characters or something like that, in there.  Even trying
to quote that section in my editor for reply purposes makes a huge mess.

> AND it has the "problem" of more than 4 partitions on the first drive.

Yes, however, I also posted a prototype layout for /dev/sda that 
shows what happens when you _do_ exceed four.  One of the four base
entries in the partition table gets the "extended" flag.  An 
extended partition is a container of / pointer to data-bearing
partitions.  You cannot mount one.

Having created such a partition (and I'm talking about using standard
tools such as /sbin/fdisk[1]), one can then subdivide the space thus
described -- the drive cylinders allocated to the extended partition --
among data-bearing partitions dubbed "logical" partitions.  _Those_ can
be mounted.  The get device names starting with /dev/sda5 and up.


> <Linux_backup>     (need better name)

It's important to realise that I was talking about _mountpoints_, not
just "names".

My server has:

[rick at linuxmafia]
~ $ mount
/dev/sda5 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,nosuid)
tmpfs on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext2 (rw,noexec,nosuid,nodev)
/dev/sdb1 on /home type ext3 (rw,nosuid,nodev)
/dev/sdb5 on /tmp type ext2 (rw,nosuid,nodev,noatime)
/dev/sdb8 on /usr type ext2 (rw,nodev)
/dev/sda9 on /usr/local type ext3 (rw)
/dev/sdb7 on /var type ext3 (rw,nosuid,nodev,noatime)
/dev/sda8 on /var/log type ext2 (rw,nosuid,nodev,noatime)
usbfs on /proc/bus/usb type usbfs (rw)
[rick at linuxmafia]
~ $ 


The mountpoint for /dev/sda5 is "/" -- the main fileystem root.  It's
the "root filesystem".

/dev/sda1 has a mountpoint of /boot ; i.e., it's grafted onto the 
root filesystem during bootup such that its contents appear within 
the /boot directory tree.  This means that the root filesystem has 
a stub directory called "/boot", and the boot-up process includes doing
this behind the scenes:

   mount  -t ext3  /dev/sda1  /boot

That means "mount as type ext3 the filesystem visible as device
/dev/sda1, onto mountpoint directory /boot."

Similarly, the root filesystem has a stub directory called /home, and
the bootup process includes mounting the /dev/sdb1 filesystem at that
mountpoint.  And so on.


> Maybe combine backing up both windows data and Linux data in one big
> partition in a format that "works" for both OSes.

You can sort-of make that work, but you'll probably find that it's
ultimately not a good idea.  Maybe.  See below.

> Interesting how Linux has adapted to handle NTFS, while MS will not
> recognize ext3.

First, just to stress, the project to fully support NTFS in Linux has
had problems over the years, because Microsoft Corporation refuse to
give meaningful details about its structure.  They regard that
information as a trade secret.  The ntfs-3g driver is the first NTFS
filesystem implementation for Linux that's considered safe for
write-mode access.  

Second, the other problem is the metadata of the respective other-side
OSes.  Natively-Linux filesystems are expected to accurately store and
return correct values for each file's ownership, group ownership, rights
mask, size, link count, ctime, mtime, atime, and special-file type.
If you copy Linux files over to, say, a FAT or NTFS filesystem
(native-Windows types), then some of that file metadata is inevitably
going to get lost.  (Linux code will tend to assume some sort of generic
default for them.)  Whether this is a problem or not is a matter of
circumstance, I guess.  On a workstation with a single user, you might
not care about file ownership data getting crunched down to everything
copied/moved to that partition ending up being owned by _you_, for
example.


It's possible that similar problems and concerns apply MS-Windows files copied
over onto native-Linux filesystems such as ext3.  (I'm not an MS-Windows
user or dual-booter, so this is speculation.)   Using ext3 on MS-Windows
is, by the way, possible, because the open source community long ago
coded some quite reliable implementation of ext3/ext2 for MS-Windows.
http://linuxhelp.blogspot.com/2007/03/mount-ext2-or-ext3-partition-in-windows.html
(I'm sure you can find more, if you search "ext3 Windows".)

In the past, people who dual-booted would often use a FAT partition as
common ground.  ("VFAT" just means 32-bit FAT with long-filename
support.)  But I suspect that's regarded as pretty antique, at this
point.



_______________________________________________
conspire mailing list
conspire at linuxmafia.com
http://linuxmafia.com/mailman/listinfo/conspire




More information about the conspire mailing list