LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What filesystem is safe for a Linux OS on a USB? (https://www.linuxquestions.org/questions/linux-newbie-8/what-filesystem-is-safe-for-a-linux-os-on-a-usb-4175444871/)

Death.System 01-09-2013 06:26 PM

What filesystem is safe for a Linux OS on a USB?
 
I don't know if I should post this, but sounds like a good place for it; also, I looked for it, didn't find the answer I found, so here goes.

I'm trying to install Backtrack (yeah, whatever) on a USB. I've used UNetBootin to run it like a live CD, but I want the OS installed on the USB drive. I don't know if I should change it from FAT32 to a EXT2. I read somewhere, but can't find the thread anymore that says ext4 or ext2 on a usb isn't a good idea.

Sounds like nor ext2 or ext4 is a good idea, although ext2 is safer, but as suggested in one of the answers, running fstab every week etc.

I don't know what to do, do you suggest running the OS as a live CD with UNetBootin? Or does UNetBootin have an option to actually INSTALL the OS on the USB?

I'm using VirtualBox, running the .iso of BT5, and plugging in my USB, deciding weather to format FAT32 to ext2, installing BT5 on the drive.

So in summary, is it safe to format FAT32 to ext2 and install linux? OR keep it as a live CD-like boot with UNetBootin?

What do you guys suggest?

Thank you :)

lleb 01-09-2013 07:06 PM

it will need to remain fat32 in order to boot. that is fine.

http://www.linuxliveusb.com/

try that out.

otoomet 01-09-2013 07:10 PM

ext2 (or any other) does not work well in my experience because of file ownership issues. fatXX gives all the files to the user who mounts the file system (well, depending on the mount options). extX give the ownership to the original owners. So if you move with such a stick between owners, you may discover that files are owned by user 500 or 1004 or another user on your computer, whoever happens to have the same id. If you keep it in the same computer, then it should be OK. (maybe I miss something, but this is my experience.)

unetbootin installs distro on usb stick. It acts as an additional harddisk for your computer, onto which the distro is installed.

snowday 01-09-2013 07:22 PM

I would use ext4 with the 'noatime' flag, personally, for a full install to USB (as opposed to a Live USB situation). I do not know anything about the Backtrack installer, sorry. For a distribution such as Ubuntu you would just use the regular Ubiquity installer for this purpose.

The drawbacks of a full USB installation (in comparison to a regular hard drive install) will be slower performance and, possibly, shorter lifespan of the USB medium.

jschiwal 01-09-2013 07:33 PM

For external USB hard drives, ext3 or ext4 are best. For usb thumb drives, use ext2 and use the noatime mount option.
Ext3 and ext4 use journaling which increase robustness of the filesystem, but also the number of writes for thumb drives.

Fat32 is a terrible filesystem for Linux because it doesn't support Linux ownership or permissions. The ownership and permissions are determined for the entire filesystem in the mount options.

For an external usb drive with a physical hard drive, you can simply install as if you were installing it to disk. Just be careful were grub is installed to. The easiest way is to install grub to the MBR of the external drive, and use the fast boot menu of your computer to boot from the usbdrive instead.

snowday 01-09-2013 07:46 PM

While I agree with jschiwal's excellent advice, the advantage of a journaling filesystem like ext4 for this purpose is better recovery if there is unexpected power loss, the laptop's batter runs down, the USB drive is accidentally knocked out of the port, etc.

Yes, the flash drive will wear out eventually (years, probably), but I wouldn't worry too much about the lifespan of a device that costs less than $10, so long as you have good backups (which you should anyways---a thumb drive is easy to lose).

schneidz 01-09-2013 08:28 PM

one thing i hate about unetbootin is that the file system needs to be fat32 for some strange reason.

i think the the fedora live-usb-creator needs to formatted with ext2.

lleb 01-09-2013 08:47 PM

Quote:

Originally Posted by schneidz (Post 4866589)
one thing i hate about unetbootin is that the file system needs to be fat32 for some strange reason.

i think the the fedora live-usb-creator needs to formatted with ext2.


nope, in order to contain an MBR, it must be fat. the other partition can be any format it matters not.

Even when creating a Live bootable USB you must create a dos bootable partition first, then you can split the rest into what ever file system type you desire. ext2,3,4,riser, etc...

lleb 01-09-2013 08:50 PM

https://fedoraproject.org/wiki/How_t...iveCD/USBHowTo

here is a better howto:

schneidz 01-09-2013 08:57 PM

Quote:

Originally Posted by lleb (Post 4866601)
nope, in order to contain an MBR, it must be fat. the other partition can be any format it matters not.

Even when creating a Live bootable USB you must create a dos bootable partition first, then you can split the rest into what ever file system type you desire. ext2,3,4,riser, etc...

i'm not saying your wrong but my experience is that you can create a single ext2 partition, install something like fedora-live on it then boot from it (without first needing to create a fat32 partition then chain-booting it).

regards,

snowday 01-09-2013 10:11 PM

I have successfully used Unetbootin with ext2 many times. :)

jschiwal 01-09-2013 10:22 PM

Quote:

Originally Posted by lleb (Post 4866601)
nope, in order to contain an MBR, it must be fat. the other partition can be any format it matters not.

Even when creating a Live bootable USB you must create a dos bootable partition first, then you can split the rest into what ever file system type you desire. ext2,3,4,riser, etc...


No, the MBR is on the first block of the drive, before the beginning of the first partition. The first partition begins either on block 63 or 2048. There is an excellent Wikipedia article on the MBR.

TobiSGD 01-09-2013 11:00 PM

Quote:

Originally Posted by jschiwal (Post 4866640)
The first partition begins either on block 63 or 2048.

Just for clarification, this is just a convention, no necessity. There is no technical reason that would stop you from starting the first partition at sector 1024 or sector 2657, apart from possible alignment problems. But of course most of the time it is a good idea to use the standard options.

lleb 01-10-2013 07:56 AM

thanks for the info.

schneidz 01-10-2013 09:38 AM

Quote:

Originally Posted by snowpine (Post 4866634)
I have successfully used Unetbootin with ext2 many times. :)

thanks, maybe its xbmcbuntu that insists on fat32 then.


All times are GMT -5. The time now is 03:04 AM.