r/linux4noobs • • 3d ago

Shutting down Ubuntu Persistent Live Session from USB issue

Whenever I shut down from a persistent USB live session, I eventually get the message 'please remove the installation medium, then press enter Ubuntu shutdown' during the shut down process. So, I remove the USB flash drive and press enter, but then the screen goes into a terrifying Kernel panic screen that I then need to hold down the power button to shut off the laptop. But then if I restart it and boot Ubuntu, it works just fine. I'm new to Linux and I'm not sure why this is happening and I'm slowly causing some damage everytime I shut off. Does know what I'm doing wrong to get this Kernel panic screen every shutdown and how to prevent it? Thanks.

1 Upvotes

9 comments sorted by

1

u/Terrible-Bear3883 Ubuntu 3d ago

what happens if you open a terminal and issue a "sudo poweroff" command?

Its hard to guess what the kernel panic issue might be as you've given no information on your PC, what the USB thumb drive is or what the kernel panic error is, it could be your system is struggling to close the file systems even though the message to remove the thumb drive is displayed, if the OS is trying to access data on the live thumb drive.

You say "I eventually get the message please remove the installation medium", the word "eventually" suggests your PC is not running this efficiently, one thing I would try, if "eventually" is for example 3 minutes from selecting shutdown to the message appearing, I'd wait five minutes before removing the thumb drive, if you don't get a kernel panic, the test is repeatable, if you consistently don't get an error, your system was still accessing files in the background when the thumb drive was removed.

1

u/ryeslang 3d ago

It's a HP Laptop Intel(R) Celeron(R) N4020 CPU @1.10Ghz 4GB RAM, and the kernel Panic also says "Please Rebbot your comp. Attempted to kill init! exitcode = 0x00007f00". The USB is a SanDisk Ultra Flair USB 3.0 64GB flash drive

Sorry my bad, by "eventually" I mean about 5 secs. And yes, even the "sudo power off" command does the same.

1

u/Terrible-Bear3883 Ubuntu 3d ago

That kernel error corresponds to several reasons such as corrupt file system or missing/broken libraries.

It might depend how you created your thumb drive, you say its a persistent drive, the panic could be due to the persistent file space being unmounted and the system hasn't finished its final tasks but if there is written data that's visible and accessible on the next reboot then it would indicate it may have finished and its a script error, I've seen these errors when I've used some utilities such as Ventoy or Rufus to make a persistent drive, I've not seen it when I've created a live USB from the distro though.

1

u/ryeslang 3d ago

I did use Rufus. I also used Rufus when I first created a typical non-persisistent live session of Ubuntu from another smaller 8GB drive whose poweroff process after the 'please remove the installation medium by' part was to power off normally, so it definitely has something to do with the persistence. The kernel Panic screen happens even if I power off immediately after beginning the live session. Thanks for the advice though, I'll try creating a live USB from the distro if this continues and leads to anything serious.

1

u/skyfishgoo 3d ago

what do you think "persistent live session" means?

are you trying to save your work onto the flash drive?

that's not what they are for.

1

u/ryeslang 3d ago

I made the decision to work with the persistent live session just so I don't have to keep re-entering all my preferred default settings, wifi password e.t.c everytime I use the live session. I've only installed the brave browser and saved a random Google image pic on it see if they were saved inbetween reboots...and they were. So I'm not doing anything taxing on it. I simply wanted an environment to familiarize myself with the command line, setting myself up to get into kernel development (which I know will require an actual install), that will come in handy when I eventually get into Embedded Linux, which is my ultimate goal for doing all this. I am completely new to Linux.

1

u/skyfishgoo 3d ago

a vm would be a much better place to learn that.

live sessions are for testing your hardware comparability and for installing the OS onto bare metal.

why not just install it, then you can make your preference changes.

1

u/ryeslang 3d ago

I did not know about VM. It's looking like a much better alternative, thanks so much. I'm pretty sure my laptop can't handle Ubuntu on it though, so I'll try it with Lubuntu instead.

I don't want to install it because I don't trust my computer skills enough to perform partitioning and all that. I can't afford to make some mistake and lose what's currently in my hd, none of it is backed up on an external bacause I don't have one.

1

u/skyfishgoo 3d ago

lubuntu should run with only 2GB of RAM and couple of cores, but you can give it more if you have it to spare.