LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Create USB Linux with RW permission. (https://www.linuxquestions.org/questions/linux-newbie-8/create-usb-linux-with-rw-permission-4175588619/)

hack3rcon 09-03-2016 01:07 AM

Create USB Linux with RW permission.
 
Hello.
How can I create a USB bootable with RW permission? I mean is that it is not like a CD\DVD and I can install applications and create files on it.

Tnx.

Teufel 09-03-2016 01:13 AM

Just install a system to USB. As well as you installing it to your hard drive.

jefro 09-03-2016 04:41 PM

Teufel is correct. To most modern linux distro's, a usb attached drive is just like an internal hard drive.

To install you will have to be careful or do what I do. I use a virtual machine to prevent making a mistake. Otherwise remove the data or power to internal hard drives.

Emerson 09-03-2016 05:00 PM

In some cases kernel wants to mount / before USB support is loaded [and panics], then you need to add rootwait to the kernel command line.

Shadow_7 09-03-2016 05:35 PM

There are install methods for various distros to install linux in linux via chroot. Which gives you full control over the partitions and filesystems that are in use. For debian, debootstrap is the tool geared for this type of install. Arch has a way and a gentoo stage 1 install is another way. You can also rsync an existing install and boot that up. Just modify /etc/fstab to reflect the new location and setup a bootloader to use it. Or reuse the bootloader(s) already on your system(s). There's puppy and other distros designed to run entirely from ram.

ondoho 09-05-2016 12:19 AM

i have a suspicion that op wants a "distro on a stick" to take with them.

while it is possible to simply install any linux TO a usb stick, there's a few hurdles:

- will the installer make some decisions about the hardware used at that moment? in that case the result wouldn't be very portable, i.e. risk of failure when booting from different hardware.

- if you don't have a superfast usb stick connected to a superfast usb 3.0 port, this will be almost impossibly slow to use at times, because the resulting install will happily write/read to/from the stick, maybe even create a swap partition on the stick!

fwiw, i'm currently looking for a distro on a stick myself.
not so easy.
i don't want to use one of those run-everything-as-root distros.
what's left? Porteus, Slitaz, DamnSmallLinux (it seems people are still using it), Alpine Linux seems to have an option.

IsaacKuo 09-05-2016 03:27 AM

If you want to do it the easy way, use Debian (current release is Debian 8) and choose "Manual Partitioning" when given the choice. Delete any partition that already exists on the USB drive, and create a new full size partition and finish. It will ask whether you REALLY want to continue without creating a swap partition. You do indeed want to continue without creating a swap partition.

It's easy as pie with Debian. I've done it many times with various versions of Debian. It just works. The default install is nice and generic. It does NOT automatically try to use any other discs/partitions it sees at install time (useful because it does NOT rely upon any swap partitions you don't specifically tell it to use). It does NOT try to install anything specific to the current computer's hardware, unless you specifically tell it to (for example, doing a manual step to install some particular driver).

What Debian's installer DOES do, by default, is use UUIDs to identify the partitions. That means that the USB stick DOES work in another computer even if the number of drives is different and there are multiple USB sticks plugged in, and your USB stick has a different /dev/sdX identifier. You just set the BIOS to boot from your USB stick first, if necessary, and IT JUST WORKS.

jefro 09-05-2016 02:54 PM

I used to live with real installs to slow usb 2 flash drives. A live usb created on a flash drive tends to be quick because the data on the usb is compressed. When the cpu needs to access the data it moves the compressed data over then acts on it. This is why some people find a slow usb 2 flash real install to be poor.

Some few usb flash drives just don't work well with ext4 for some odd reason.

It is well worth your time to buy a very fast usb 3 flash drive if you want to run linux on it as a native install.

Shadow_7 09-05-2016 04:06 PM

Some distros like puppy and tails load into ram when you boot them, so outside of adverse boot times (and persistence issues) the speed of the storage medium is moot. As long as you have enough ram.

I've lived on slow storage most of my life. It's not that slow. Well, you'll buffer on file I/O if you try to watch youtube in a browser, but you can mitigate that by putting /home/ in a ramdisk, or at least the parts of /home/ that are the browsers cache. Or you could use a class 10 or higher SDHC card and a reader, or an even better usb 3 class stick. Just don't plan on using and abusing it for more than six months without getting dangerously close to the inevitable. So make sure that you have more than one. And a good card reader as some are not bootable, and some are only good up to certain sized cards. I kind of like the SDHC route since you can walk into almost any store and pick one up for $10-ish. And they keep getting faster. Where picking up a hard drive off the shelf is something that you can't do anymore in a walmart. And OTS drives in a best buy is risky business as the front couple obviously flipped off the shelf and onto the floor at least once.

jefro 09-05-2016 07:00 PM

I used to really like the TORAM options on live media. Nothing says fast like ram.

ondoho 09-07-2016 01:06 PM

ok, the non-tech-savvy answer is antiX.
the only problem is, you'll temporarily need 2 usb sticks, or antix installed to a hd.

- first, you create your usual live medium, boot into that
- then, from the antiX Control Centre => Disks => antiX2usb, follow instructions, install to the 2nd usb stick, root & home persistence and so on.

btw, slitaz has a similar feature, but i find the kernel a little too old for my taste (3.2.x).

hack3rcon 09-09-2016 05:35 AM

I like to create a usb with a Live distro.

yancek 09-09-2016 07:41 AM

Putting aa Live CD on a usb drive with r/w capabilities is referred to as persistence and the method varies depending upon which Linux you are using.

Shadow_7 09-09-2016 01:58 PM

Sometimes I have to create two usb bootable linux's on the same stick. Case in point, arch only boots with secure boot on my hp stream 11. But since I whiped the windows on the main MMC drive, I have to use the bootloader for xubuntu to boot it. Since grub-install (and even refind), can't find an EFI partition to fiddle with under arch. I'll probably revamp this soon to be a 1GB partition for debian, and a 28GB partition for arch on the MMC drive soon. Or 1G deb, 2G swap, 26G arch. But I have several bootable usb options already should I mess it up.

hack3rcon 09-14-2016 12:56 AM

I like to create "Tail" distro on my USB but I like to have RW permission.


All times are GMT -5. The time now is 12:56 AM.