LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-27-2021, 01:38 AM   #1
SamHobbs
Member
 
Registered: Nov 2021
Location: California, USA
Posts: 83

Rep: Reputation: Disabled
Running Ubuntu from USB drive and using a hard drive for persistence


I have been using Windows for decades. I want to transition to Linux.

For the moment I have Ubuntu on a USB drive that I can boot. Silly me, I did not realize that Ubuntu will save nothing to the USB drive. I have read that I can do the install again and make it persistent. There are very many options. I just want a little guidance; I can read the documentation for details.

I have an unused 472 MB hard drive partition. Can I use that for storing stuff from the Ubuntu on a USB drive? Can I install software, such as Eclipse, in the hard drive partition? If you can tell me where to look in the documentation then I can hopefully figure it out.

This would be a temporary situation. I intend to get a new, larger, SSD and then I can create a separate partition for Ubuntu and dual-boot (I hope) that and Windows.
 
Old 11-27-2021, 01:54 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by SamHobbs View Post
For the moment I have Ubuntu on a USB drive that I can boot. Silly me, I did not realize that Ubuntu will save nothing to the USB drive. I have read that I can do the install again and make it persistent. There are very many options. I just want a little guidance; I can read the documentation for details.
A simple misunderstanding.
You write the Ubuntu installation medium to a USB stick or similar - that is not the same as installing it!
Then you boot from that bootable installation medium (select the USB stick during early boot, BIOS).
Then you go through the installer and actually install Ubuntu to your hard drive.
Now a full read/write Ubuntu OS is installed on your machine.

"USB with persistence" is a different thing! I'm 99% sure that's not what you want.
 
Old 11-27-2021, 02:14 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Caveat emptor: I've never used persistence that I'm aware of - assign the following value accordingly.

Pages such as this indicate it should be as simple as formatting the partition as ext4 and giving it a label of casper-rw - careful, linux like its cousins, is case sensitive.
Reboot, and it should be found. General non-system updates should be ok.

Last edited by syg00; 11-27-2021 at 02:24 AM. Reason: cleanup
 
1 members found this post helpful.
Old 11-27-2021, 02:54 AM   #4
SamHobbs
Member
 
Registered: Nov 2021
Location: California, USA
Posts: 83

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
A simple misunderstanding.
You write the Ubuntu installation medium to a USB stick or similar - that is not the same as installing it!
Then you boot from that bootable installation medium (select the USB stick during early boot, BIOS).
Then you go through the installer and actually install Ubuntu to your hard drive.
Now a full read/write Ubuntu OS is installed on your machine.
I understand. Yes it is a bit confusing. When I boot, it has a Try button (I forget all the words) for trying Ubuntu without installing. And since it works nearly the same as if it was installed as you describe, other people with more experience than I refer to it as installing. And I hear you saying but no it is not installing. Terminology such as this can be frustrating. I get frustrated when people say (Windows) DLL without specifying what type of DLL.

A question that might help me and I think others too is, is it possible to install Linux onto a USB stick such that it executes the same as if it was installed in the manner you call installation on a hard drive?
 
Old 11-27-2021, 03:06 AM   #5
SamHobbs
Member
 
Registered: Nov 2021
Location: California, USA
Posts: 83

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
Caveat emptor: I've never used persistence that I'm aware of - assign the following value accordingly.

Pages such as this indicate it should be as simple as formatting the partition as ext4 and giving it a label of casper-rw - careful, linux like its cousins, is case sensitive.
Reboot, and it should be found. General non-system updates should be ok.
Okay well under Alternatives it says ext2, ext3 or ext4 partition with the label casper-rw, and that partition can be 'anywhere' but it also says Just add the boot option persistent when you want persistence and it is not clear how relevant that second part is to the first part. If the second part is not a requirement for the first part and it is as simple as you say then that sounds interesting and promising.
 
Old 11-27-2021, 03:16 AM   #6
Racho
Member
 
Registered: Oct 2021
Posts: 59

Rep: Reputation: Disabled
Quote:
I have an unused 472 MB hard drive partition. Can I use that for storing stuff from the Ubuntu on a USB drive?
The default file manager on ubuntu is called nautilus.

I'm not using ubuntu right now, but i think that in nautilus you have a side pane, there you can see the storage devices in your pc and you can "mount" them.
Roughly speaking, mount a partition or a device means make it accessible throw a directory so that you can use it.

Quote:
Can I install software, such as Eclipse, in the hard drive partition?
I've never tried it, I would say that it's possible but it must be a quite advanced stuff so I would never advise any newbie to try it.

I have also never used persistence, but if you want to install or update software in a bootable usb then give it a try.
If you just want to save files, mounting the partition is enough for you.
 
Old 11-27-2021, 03:24 AM   #7
Racho
Member
 
Registered: Oct 2021
Posts: 59

Rep: Reputation: Disabled
Quote:
Okay well under Alternatives it says ext2, ext3 or ext4 partition with the label casper-rw, and that partition can be 'anywhere' but it also says Just add the boot option persistent when you want persistence and it is not clear how relevant that second part is to the first part.
Persistence only works on ext2, ext3 or ext4 partitions.

I'm not sure if that answers your question though
 
Old 11-27-2021, 03:39 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by SamHobbs View Post
... but it also says Just add the boot option persistent when you want persistence and it is not clear how relevant that second part is to the first part.
- good pick up.

Normally you should see a message like "hit <Tab> for boot options" during boot of the USB. Just add it to the end of the line that pops up. Been too many years since I tried Ubuntu. I'll see if I can test it sometime.
 
1 members found this post helpful.
Old 11-27-2021, 05:11 AM   #9
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490
Quote:
A question that might help me and I think others too is, is it possible to install Linux onto a USB stick such that it executes the same as if it was installed in the manner you call installation on a hard drive?
Yes but understand that using a 'usb stick' is going to be slower for one thing. Better to use an external HD if you can. You simply need to know which device is which by using commands such as: sudo fdisk -l, sudo parted -l. Are you familiar with Linux drive/partition naming conventions? Good place to start if you are not.

It's been a while since I have done any of this but I doubt you will be able to boot with persistence if you do not have the word "persistent" in the boot menu line. My recollection of this is that the word "persistent" needed to be in a specific location in the boot entry, not sure about that. If you already have your usb, that would mean editing Grub (if you are using Grub) to add persistent on each boot

I believe originally this persistent file was vfat and it usually was a file rather than a partition. With changes made over the years, you can now use a Linux filesystem and if you do, the only limitation on size is the drive space you have available.

With persistence, you can save data files, images, etc. and install new software. You can't select where to install the software any more than you could on a standard Linux due to the way Linux works. THere are other limitations also with persistence, you cannot modify system files or kernels. You should be able to use the 472MB space you mention you have on your HD if you create a partition from it to store data to.

You need to also understand the difference between a 'live' Linux which contains the installer plus the system but is read only, runs in RAM and all is lost on reboot. Persistence modifies that with limitations but you're better off doing a full install when you get the SSD.
 
1 members found this post helpful.
Old 11-29-2021, 12:33 AM   #10
SamHobbs
Member
 
Registered: Nov 2021
Location: California, USA
Posts: 83

Original Poster
Rep: Reputation: Disabled
I don't understand why everyone is so against creating a USB stick that is portable and can be used by nearly any desktop PC (Intel architecture).

I found Puppy Linux and I created a USB stick with it that does save sessions. I just need to explicitly save the session at the end. Apparently we can install software into it. A 32 GB USB stick seems to be huge for it; I do not know what to do with the extra space.

I have learned a lot and will continue to learn.
 
Old 11-29-2021, 12:40 AM   #11
SamHobbs
Member
 
Registered: Nov 2021
Location: California, USA
Posts: 83

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
Better to use an external HD if you can.
Someone might not be ready to devote a drive, not even an external drive. A USB stick is cheap. You can get people started with Linux with a USB stick and then they will want to improve upon that.
 
Old 11-29-2021, 02:44 AM   #12
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by SamHobbs View Post
I don't understand why everyone is so against creating a USB stick that is portable and can be used by nearly any desktop PC (Intel architecture).
Everybody ?. That might be a stretch.
The query you posed limits the effectiveness as a general solution somewhat. But liveUSB are a godsend for recovery - as everyone knows.
 
Old 11-29-2021, 07:42 AM   #13
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490
Quote:
I don't understand why everyone is so against creating a USB stick that is portable and can be used by nearly any desktop PC (Intel architecture)
That's a bit of an exaggeration. Flash drives are more convenient, granted as they are much smaller than an external drive and of course, cost less but they also don't last as long. People are just offering opinions and doing a 'live, persistent' USB should not be that difficult particularly if you are using Ubuntu as there are numerous sites explaining it.

Quote:
Someone might not be ready to devote a drive,
It's not necessary to devote an entire drive, it depends upon how you create the USB. You could put the 'live' iso on a drive, create your 'casper-rw' or 'home-rw' persistent and create an additional partition to use for backups or specifically for other files (pictures, music) you want.

Persistent 'live' usbs are disussed at the lik below which is specific to 'Lubuntu' but applies to Ubuntu also. The person who initiated the discussion 'sudodus' is also the person who created the mkusb software which is excellent for this purpose. The 2nd link below is to the site for mkusb which should be in your Ubuntu repositories. The site explains how to install mkusb and how to use it. It's as complete and easy to use as any software of this type I have seen or used.

https://discourse.lubuntu.me/t/add-a...txt-cfg/1039/5

https://help.ubuntu.com/community/mkusb

Also, standard 'live' Linux systems have no password so that's a potential security problem is someone else gets hold of the usb. Another minor thing is that an advantage (size) can be a disadvantage as it would be a lot easier to lose something the size of a usb as opposed to a hard drive. Nobody worries about that until it happens to them.

Last edited by yancek; 11-29-2021 at 07:56 AM.
 
Old 11-29-2021, 08:07 AM   #14
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
Rufus is another windows program that will put a live iso onto a usb with the option to create a persistent partition. https://rufus.ie/en
A live usb is
 
Old 11-29-2021, 10:41 AM   #15
enigma9o7
Senior Member
 
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi Linux
Posts: 1,388

Rep: Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560
You can install linux onto a usb hard drive (or pen drive, etc) if you want, pretty much the same method as installing to an internal ide or sata drive. Of course you cannot install to the installation media, so if you're installing from cd/dvd no worries; if installing from usb, you'll obviously need another usb drive to install to.

Quote:
Originally Posted by SamHobbs View Post
I understand. Yes it is a bit confusing. When I boot, it has a Try button (I forget all the words) for trying Ubuntu without installing. And since it works nearly the same as if it was installed as you describe, other people with more experience than I refer to it as installing.
Pretty sure you imagined that. Nobody says booting live is installing, ever. If your iso includes a "live" (try) mode, you can boot that to test things before you install.

Last edited by enigma9o7; 11-29-2021 at 10:44 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux distro for using it as live-usb with persistence supporting nvidia 1060? udayuk Linux - Newbie 11 10-16-2018 10:10 AM
problem logging into live session user ubuntu (on usb stick with persistence) jones5 Ubuntu 53 04-10-2015 10:52 AM
Linux USB Flash Drive Installations, persistence, limited writes, updates.... AdamN Linux - General 5 12-20-2013 06:25 PM
Problem with persistence with Ubuntu from USB. villmatic Linux - Laptop and Netbook 7 04-16-2013 11:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration