Flash Drive with Ext4 and Windows-compatible filesystem

Here you can post about your various experiences with PC hardware. You can also post about hardware that is not compatible with the linux kernel or not recommended for use with Porteus.
tin
White ninja
White ninja
Posts: 11
Joined: 09 Jun 2014, 14:50
Distribution: KDE, LXDE
Location: Vienna

Flash Drive with Ext4 and Windows-compatible filesystem

Post#1 by tin » 09 Jun 2014, 15:14

Hey guys!

So, i have just recently gotten into porteus and love the idea of this portable os, so i decided to install it on my 16gb usb3.0 flash drive.
i didn't want to use the .dat file option that you need when using fat32 (or ntfs) so i decided to partition my flash drive to a ext4 formatted filesystem, and a fat32 one, so i can access my files over windows and not have to boot from the flash drive everytime.
unfortunately, as most of you may know, windows can only register the first partition of a flash drive, alas, the fat32 partition has to be the first one.
so after playing around and having a lot of trouble trying to to do partition the flash drive using linux mint (windows wouldn't recognize the fat32 partition at all) i tried doing it in windows 7, but i couldn't create a readable partition that isn't taking up the whole drive! so i downloaded minitool partitioning wizard and used that, but now i coulnd install porteus via linux mint!!!

Please help guys! Long story short, what i want is to have porteus installed on ext4, but also have a partition readable by windows!
i'm actually a noob regarding all of this basically, but i still tried my best (and failed terribly)

Thanks (and sorry for the messy post i never use forums xD)

tin

User avatar
Blaze
DEV Team
DEV Team
Posts: 3869
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Re: Flash Drive with Ext4 and Windows-compatible filesystem

Post#2 by Blaze » 09 Jun 2014, 16:26

Hi, tin.
Try this app Paragon ExtFS for Windows
Image
Regards,
Blaze
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Flash Drive with Ext4 and Windows-compatible filesystem

Post#3 by Ed_P » 09 Jun 2014, 17:09

Blaze wrote:Hi, tin.
Try this app Paragon ExtFS for Windows
Regards,
Blaze
An interesting app Blaze. Image Thanks for posting it.

tin, being a Windows user also, I understand your situation. You will have to use a Linux system to initialize your flash drive and allocate it's partitions. You could allocate them as 50/50, 8GB for the first partition and 8GB for the second, format the 1st as FAT32 and the 2nd as ext4. Then copy the Porteus files from your ISO to the 2nd partition and then if you run the Porteus-installater-for-Linux.com in the boot directory I believe that will work. I have not personally tried this but I think it will.
Ed

tin
White ninja
White ninja
Posts: 11
Joined: 09 Jun 2014, 14:50
Distribution: KDE, LXDE
Location: Vienna

Re: Flash Drive with Ext4 and Windows-compatible filesystem

Post#4 by tin » 09 Jun 2014, 21:36

Thanks for the fast responses! :)

Blaze, that's a great solution for my own pc, the problem is that this is the flash drive i always take with me and use on other pcs, for example my school and the computers of other people i know, so i can't install this app on every single pc i want to use the flash drive with.. :/

Ed, that's exactly what i did, i formatted the first partition as fat32 and the second one as ext4, both occupying 50% of the drive, but when i did this in linux, windows couldn't recognize the drive and asked me to format it (the whole thing) and when i did it in windows with MiniTool Partition Wizard, it wouldn't work with linux, because it for some reason thought it is a gpt drive, which it is not. :s

any other suggestions? :/

tin

donald
Full of knowledge
Full of knowledge
Posts: 2064
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Re: Flash Drive with Ext4 and Windows-compatible filesystem

Post#5 by donald » 09 Jun 2014, 23:20

@tin
--> did this in linux, windows couldn't recognize <--
Open windows "Disk Management", if you can see the Partition (fat32) you may need
to manually assign a Drive-Letter.

--> thought it is a gpt drive <--
Are you sure that you created a ms-dos partition table?

The easiest way to do the Partitioning,
is within a running Porteus (kde) Live-CD/usb environment.

tin
White ninja
White ninja
Posts: 11
Joined: 09 Jun 2014, 14:50
Distribution: KDE, LXDE
Location: Vienna

Re: Flash Drive with Ext4 and Windows-compatible filesystem

Post#6 by tin » 09 Jun 2014, 23:30

thanks donald, i'll try that next, will let you know if it worked ;)
and yes i am pretty sure minitool partition wizard told me it is, but thank you anyway haha

tin

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Flash Drive with Ext4 and Windows-compatible filesystem

Post#7 by Ed_P » 09 Jun 2014, 23:47

tin if manually assigning a drive letter under Windows doesn't resolve the problem it might be good to nuke the drive and start over. See this posting for how to: Uefi and porteus 3.0

Once cleared I use Porteus's GParted app to allocated partitions and format them.

hth
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: Flash Drive with Ext4 and Windows-compatible filesystem

Post#8 by brokenman » 10 Jun 2014, 02:08

Here is what I would do. Boot porteus (or any other live distro) and open a terminal.

Unmount all USB partitions then open the partition creation utility.
cfdisk /dev/sdb

From there you can use the CLI to create your partitions. Create the first partition as FAT32, second as ext2. Set the first partition as bootable. Write the changes.
mkdosfs /dev/sdb1
mkfs.ext2 /dev/sdb2
partprobe /dev/sdb


Copy the boot folder from the Porteus ISO onto the first partition. Copy the porteus folder from the porteus ISO onto the second partition. Change into the boot folder and run the installer_for_linux option.
Find the UUID of the second partition: blkid
Open the file boot/syslinux/porteus.cfg and add to the APPEND line from=UUID:XXXXXXXXXXXXX (where XXXXXX is your UUID for the second partition)
Reboot.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: Flash Drive with Ext4 and Windows-compatible filesystem

Post#9 by Ed_P » 10 Jun 2014, 15:31

A very clever approach brokenman. :good:
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: Flash Drive with Ext4 and Windows-compatible filesystem

Post#10 by brokenman » 10 Jun 2014, 18:52

Thanks. In theory only though.

I havn't actually tested it in Porteus v3.0 but this is the way we used to do it back when the bootloader did not support extX partitions and would only run from FAT32. I didn't want to run porteus with a save.dat file hence the second ext2 partition.
How do i become super user?
Wear your underpants on the outside and put on a cape.

tin
White ninja
White ninja
Posts: 11
Joined: 09 Jun 2014, 14:50
Distribution: KDE, LXDE
Location: Vienna

Re: Flash Drive with Ext4 and Windows-compatible filesystem

Post#11 by tin » 10 Jun 2014, 22:46

Ok so first of all big thanks to all of you for ypur great help! :))

Thanks Ed for the nuke, did that! :)

Brokenman, thanks for the instructions, since CLI does not use the command line directly but instead lets you choose the options with the arrow keys for the options, i used gparted for the partitioning. I formatted the first partition as fat32 and the second one as ext2 and then added the boot label to the fat32 one. I copied the boot and porteus folders as you told me and then installed porteus using the terminal. Well that was easy, but then when i opened the cfg file i had no idea what to do since i really dont understand the code... So i did what common sense told me to and added APPEND initrd=UUID:XXX by copying the UUID i found in the information window in gparted. And wow who would have guessed, it worked, even though my approach was not really the one you told me! :D

Great thanks to all of you that helped me, this is really a great community, i mean getting help from the from the forum admin says a lot about it!

Thanks again,
tin

tin
White ninja
White ninja
Posts: 11
Joined: 09 Jun 2014, 14:50
Distribution: KDE, LXDE
Location: Vienna

Re: Flash Drive with Ext4 and Windows-compatible filesystem

Post#12 by tin » 10 Jun 2014, 22:48

I still do have one question, why should i use ext2 and ext4? I would think that ext4 is a newer version... Or is it just different?

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: Flash Drive with Ext4 and Windows-compatible filesystem

Post#13 by brokenman » 10 Jun 2014, 23:11

Glad you got it sorted and kudos for actually trying something new and experimenting (and sharing). You will do well with linux.

ext2 is a non journaling file system which means less read/writes to the device which means a longer life span. ext4 is safer in terms of data corruption due to journaling. There is no best or worst really, just a preference. You sacrifice life span for security or vice versa. The price of pendirves is rather good these days so it makes an ext4 file system worth while. I have never suffered data corruption and only ever used ext2, so I typed it out of habit more than anything.
How do i become super user?
Wear your underpants on the outside and put on a cape.

Post Reply