Using USB for boot and storage

I have a 128GB USB drive.
I want to flash Manjaro GNOME ISO onto it while keeping all the remaining space for storage.

I created a partition on the remaining free space, but when I launched Manjaro Live and clicked the partition in Files I got a message saying:
Error mounting … /dev/sdb3 already mounted of mount point busy

Is there a way to make it work as a storage device alongside booting device?
Thanks.

This is how you do it

1 Like

It still won’t let me use the storage part when Manjaro Live is running so it’s not what I was looking for, thanks.

Edit: BTW, is there a way to include my own files in the USB boot part? I was thinking about maybe including an image to install on the hard drive and this way I don’t really need the storage part, I can simply use the boot part.

Burned onto the USB will never let you have a different partition that is independent because the USB will always be formatted. If you insist on booting live environment then use ventoy and then you only copy iso on it to boot it, and you can keep whatever other files on the space left.
To have custom configs/apps/files in a ISO you need to build your own iso.

1 Like

@yaron What you want is something called persistent storage and a German usb distribution (Knoppix) provides just that. There are other distrubutions that provide it, see: persistent storage I haven’t looked more closely because, well I personally don’t think it’s a reliable solution but it does exist and it probably works with Manjaro.

When you use ventoy - you need to tell ventoy to leave untouched space. Then you will need to manually create a partition using the untouched space and format using either a Linux only filesystem or use exFAT to be able use it cross systems. The process is something like this assuming your device is sdy and it is a 32GB stick and you assign 8G for persistent storage. Change sdy to match your device.

$ sudo ventoy -i -g  -r 8192 /dev/sdy

Then listing the device layout you should get something like this

➜  ~ lsblk -o NAME,SIZE,FSTYPE /dev/sdy
NAME    SIZE FSTYPE
sdy    29,9G 
├─sdy1 21,8G exfat
└─sdy2   32M vfat

As you can see we have 8G empty space and now we extend the stick with a partition using the remaining space and format this exFAT - because exFAT don’t require permissions so world read write - no problems. If you are getting an error executing below command - install the package gptfdisk using pacman.

$ sudo sgdisk --new 3:: --typecode 3:0700 --change-name 3:"Microsoft basic data" /dev/sdy

Format partition using exFAT

$ sudo mkfs.exfat /dev/sdy3

Check the stick

➜  ~ lsblk -o NAME,SIZE,FSTYPE /dev/sdy
NAME    SIZE FSTYPE
sdy    29,9G 
├─sdy1 21,8G exfat
├─sdy2   32M vfat
└─sdy3    8G exfat

Copy your Manjaro ISO onto the first partition no burning plain copy and reboot your system using the USB stick.

1 Like

I would suggest to install Manjaro on USB driveinto dedicated partition with standard installer . It would let you to keep setting and files within Manjaro partition. Just don’t forget to place bootloader on USB drive during installation. The other part of USB could be formatted into some other file system.

I personally have such 1Tb USB drive with 20Gb for Manjaro and other space for ntfs partition. Everything works flawlessly with Legacy BIOS boot mode. I have some problems with UEFI booting but hope to solve it in near furure )))

Strange. I had problems with legacy and solved it by activating UEFI. Your solution works, of course, but you install the OS on one computer and the idea of usb based OS is that you can use it in many different situations.

Thank you for pointing this solution out. I tried it and it is amazing that it allows starting different OS while giving access to a shared storage.

Actually I use such USB on three different computers (two laptops and one desktop) :slight_smile:

So the recommendation is to install Manjaro on a USB (instead of flashing the ISO)?

Well that works and if your hardware is similar then you can even use it on multiple computers. Of course the install iso takes more hardware and eventualities into account. It’s always difficult to find what the actual purpose is. Why would you want to do that? If you want to try out Gnome (see the first post) on your computer then it’s perfectly possible. The ventoy solution is better if you want to try multiple versions, like also KDE, or other Linux versions. It’s your choice.

1 Like