You are not logged in.

#1 2010-07-28 04:21:31

plmday
Member
From: Germany
Registered: 2009-02-19
Posts: 66

Set home partition fs type to vfat

Hi, guys, I am doing a regular Arch installation to a USB stick. I have no trouble finishing the installation and getting me a bootable USB disk. What I want is to combine the boot partition and home partition into one, I mean mount a single partition on both /boot and /home. This saves me partitions as it seems that I can not use logical partition on a USB disk (I am not quite sure, if some one could clarify this, thanks). Anyway, I chose the first partition for this purpose, because it allows me to transfer data between Linux and Windows. Then it implies that I have to format this partition to vfat. Unfortunately when I boot into Arch, I found that all files in /home is owned by root, even the home dir of a regular user I created. But if I format this partition to ext2, it has no such problem. So I wonder if this is specific to the vfat fs type. If not, what combinations of mount options are the best (solve the problem securely) for this purpose? Below is the entry in my /etc/fstab for this partition

LABEL=hoot /home vfat defaults 0 2

I guess the option "users" could solve it, but I wanna hear your suggestions.

Last edited by plmday (2010-07-28 04:25:50)


Arch, the Portal of Linux

Offline

#2 2010-07-28 08:51:09

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: Set home partition fs type to vfat

fat has no record of users. You set the UID and GID of all the entire filesystem at mount time; the default is root:root. Using vfat as the root filesystem type is stupid, imnsho. What you should do is, either put an ext2 driver on Windows or create another partition for sharing files.

Last edited by fsckd (2010-07-28 08:52:00)


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#3 2010-07-28 09:18:20

shetland_breeder
Member
From: England
Registered: 2010-05-17
Posts: 67
Website

Re: Set home partition fs type to vfat

Some USB sticks support partitions, some don't - depends on the stick's firmware. Corsair Voyagers do for sure.

Best solution if you must be able to share the stick with Windows is to buy one that can be partitioned.

Pete

Offline

#4 2010-07-28 10:30:49

plmday
Member
From: Germany
Registered: 2009-02-19
Posts: 66

Re: Set home partition fs type to vfat

fsckd wrote:

fat has no record of users. You set the UID and GID of all the entire filesystem at mount time; the default is root:root. Using vfat as the root filesystem type is stupid, imnsho. What you should do is, either put an ext2 driver on Windows or create another partition for sharing files.

Thanks for the info. Btw, I did not use fat as the root fs type. My root fs lies on another partition of ext2.

What I want is a portable usb stick: it can either boot into arch or run portable apps from the first partition because the stupid Windows does not see more than one partition of a usb flash disk without some hacking which requires admin privilege. It is not always available if the computer is not my own. Setting up a separate home partition is good, but it will occupy a new partition which is not wanted because I plan to put one or two other distros. That is why I try to put all  in the first partition as much as possible.


Arch, the Portal of Linux

Offline

#5 2010-07-28 10:31:51

plmday
Member
From: Germany
Registered: 2009-02-19
Posts: 66

Re: Set home partition fs type to vfat

shetland_breeder wrote:

Some USB sticks support partitions, some don't - depends on the stick's firmware. Corsair Voyagers do for sure.

Best solution if you must be able to share the stick with Windows is to buy one that can be partitioned.

Pete

Thanks. I will check to see if mine does.


Arch, the Portal of Linux

Offline

#6 2010-07-28 12:06:52

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Set home partition fs type to vfat

> I plan to put one or two other distros.
If that works, please report back.

Maybe some kind of virtual machine images or compressed filesystems (the way liveCD/liveUSB distros do it) would help you - you don't need another partition, just another file.

Offline

#7 2010-07-28 18:20:41

EVRAMP
Member
From: Czech Republic
Registered: 2008-10-03
Posts: 173
Website

Re: Set home partition fs type to vfat

I don't know if there is a way how to have /boot and /home on one partition and root on another. If you manage to achieve this, please share a solution. If you won't find any way how to do this, you can symlink /boot to /home/boot and have files from /boot there.
Please beware that Windows is able to use only first partition on removable media and can read only FAT and NTFS natively. None of these support user or group ownership.
If you would like to read linux partitions I recommend ext2fsd driver.
With this driver you are able to mount EXT2 and EXT3 partitions on Windows, as well as other partitions not only the first on removable disks.

Offline

#8 2010-07-29 04:03:53

plmday
Member
From: Germany
Registered: 2009-02-19
Posts: 66

Re: Set home partition fs type to vfat

karol wrote:

> I plan to put one or two other distros.
If that works, please report back.

No prob, smile

Maybe some kind of virtual machine images or compressed filesystems (the way liveCD/liveUSB distros do it) would help you - you don't need another partition, just another file.

Yes, I see this technique in use by many Live distros. Does it have any disadvantage? For example, when the whole file system gets bigger and bigger, would it take more time to compressing and decompressing?


Arch, the Portal of Linux

Offline

#9 2010-07-29 04:12:44

plmday
Member
From: Germany
Registered: 2009-02-19
Posts: 66

Re: Set home partition fs type to vfat

EVRAMP wrote:

I don't know if there is a way how to have /boot and /home on one partition and root on another. If you manage to achieve this, please share a solution. If you won't find any way how to do this, you can symlink /boot to /home/boot and have files from /boot there.

The solution of mine is bind /boot to /home via the following entry in /etc/fstab

/home /boot none bind

When the first partition is formatted to ext2/3, it works well. Actually, it is not necessary to always mount the boot partition unless you are upgrading the kernel. Of course, symbol link /boot to /home is also a solution.

Please beware that Windows is able to use only first partition on removable media and can read only FAT and NTFS natively. None of these support user or group ownership. If you would like to read linux partitions I recommend ext2fsd driver. With this driver you are able to mount EXT2 and EXT3 partitions on Windows, as well as other partitions not only the first on removable disks.

Thanks for this info. But as I stated, it is not always possible to install a driver on an Windows machine if it is not mine. Anyway, now I know FAT and NTFS is not the right choice for a home partition. I guess then I have no choice but to format the first partition to FAT and use it for /boot and data share between Windows and Linux.


Arch, the Portal of Linux

Offline

#10 2010-07-29 08:12:23

shetland_breeder
Member
From: England
Registered: 2010-05-17
Posts: 67
Website

Re: Set home partition fs type to vfat

What's this about Windows only being able to use the first partition on a USB stick?

I've had Corsair Voyagers with two partitions for years (one for booting DOS with Ghost and one for random files) and Windows (95, XP and Vista) could read and write both partitions.

The first was partitioned on Windows using some tool I found (Corsair, HP - I can't remember). The one I'm using now I partitioned on Linux. XP can use both partitions (formatted vfat of course).

NTFS is pretty useless unless you are running as Administrator since Windows SIDs can't be duplicated across machines.

Pete

Offline

#11 2010-07-29 09:47:42

plmday
Member
From: Germany
Registered: 2009-02-19
Posts: 66

Re: Set home partition fs type to vfat

shetland_breeder wrote:

What's this about Windows only being able to use the first partition on a USB stick?

I've had Corsair Voyagers with two partitions for years (one for booting DOS with Ghost and one for random files) and Windows (95, XP and Vista) could read and write both partitions.

I still remember what I found via Google weeks ago about this. Windows treats a USB Flash Disk as Removable, not a USB HDD. If a USB disk (usually flash) is identified as Removable by Windows, it could not see all other partitions but the first one (This is a stupid behavior many people complain.) Some smart guys figured out how to make Windows access other partitions by some tricks. One guy in particular even wrote a driver to make Windows see Any USB Flash Drive As A Local Disk. However, all these tricks require admin privilege which as I said before is not always possible if the Windows machine is not mine because I want a portable USB disk: if one machine in front of my face allows me to boot from USB, great, I can boot into one distro; if not, I can still rely on PortableApps. Because Windows can only see the first partition (of FAT or NTFS) without hacking, I have no choice but to put as much data to be shared between two OS-es as possible in the first partition.


Arch, the Portal of Linux

Offline

Board footer

Powered by FluxBB