Testy Tessa

My special interest is computers. Let's talk geek here.
User avatar
yogi
Posts: 9978
Joined: 14 Feb 2015, 21:49

Re: Testy Tessa

Post by yogi »

It's possible to use a live USB stick with Linux and not leave a trace of anything you did on the library computer. Not only that, you can easily bypass any Library security controls. Any parental controls or blocked web sites can easily be bypassed via Linux on USB. Ask the kids if they know about Tor browsers or VPN's. Total browser anonymity and encryption is easy peasy even if the kids don't know what they are doing. They just have to know how to do it. I suppose it also can be an easy way to do homework too without contaminating the library computer. But do kids really do homework in the library?

Back in my earliest days of experimenting with Linux, I did a few USB installations. It worked well enough but it was noticeably slower than the laptop native mode. Fast forward a few years with improvements in computers, USB ports, and software, and you have performance of USB systems equal to that of the motherboard. For all the trouble I'm having with UEFI and Linux, when it does work it's just as responsive from USB as it is from the SSD in the laptop. Pretty amazing to be honest.

To go a step further and run another USB client from inside the original client, I would expect some lag time. It should not be significant because the portable (host) VM would just act as a conduit (host) for the virtual machines running inside it. The data stream would be going through two Ethernet network cards instead of just one to reach the Internet connection. How much of a delay can that be?

The Linux that can be installed into Windows is Linux indeed, Ubuntu for example, but it's just the kernel. If you want networking, you need to install the networking drivers. You don't even get an Xterm server unless you install it first. It's a lot easier to burn a USB version than trying to build one inside the Windows subsystem. It can be done, but it's a lot of trouble unless you are a developer and know what you are doing.
User avatar
Kellemora
Guardian Angel
Guardian Angel
Posts: 7494
Joined: 16 Feb 2015, 17:54

Re: Testy Tessa

Post by Kellemora »

OK - The wife and I spent from 11:30 am until 1:15 pm up at the library.
The whole time we were there, at least three of the computers were unused.
Apparently school has started here.

The guy I was hoping to see did not show up, and for the first hour or so, all the folks using the computers were only using Windows. When one of the new computers opened up, a kid who was sitting for about 15 minutes jumped up and shot over there. I saw him plug a USB stick in so went around to that side of the computer table.
He was booting into SUSE.
I must have scared him when I came around the table and he saw I was looking at his screen. He hit a button and the screen changed to a screensaver. I said, no problem, I've been waiting for someone to be using a Linux Distro. I use Debian myself, but am curious how you get the Distro on a USB stick to work on these library computers.
I asked if was a LIVE USB or did he install the OS on the USB stick. He said he installed SUSE on the USB stick, so he could keep it current, and save his work. He said you can't do any of that with a Live Dongle.
I asked if he knew how to make a USB stick that works on any computer or on these Windows computers.
He said Easy Peasy.
You need two thumb drives to start, or a DVD with a Live Distro on it, 32 bit means it will work on any computer.
Step One: Boot into your LIVE DVD or Thumb Drive Distro. Create a Bootable Thumb Drive from your Live Distro on the second Thumb Drive.
Step Two: Create two Partitions on the Thumb Drive - I make a 10gb Root partition as ext4, and the other 22gb partition FAT, this is where I store my saved data and pictures. You can name your second partition DATA or anything.
Step Three: Boot back into your Live Distro and select INSTALL, you will have to answer the questions about English, Keyboard, etc. before you get to the area that says Install Third Party Software for Graphics or WiFi, etc. At Installation Type, select Something Else.
Step Four: Find the USB port your Thumb Drive is in. Use a partition table to set your Root partition to ROOT.
Step Five: Start the Install to the Root Partition. Answer more questions, location, personal info, etc. Then wait for the Install to Finish.
Step Six: Remove your Live DVD or Thumb Drive and reboot into the new USB stick.
NOTE: The computers here at the Library first check the DVD drive, so make sure it is empty. Next it will check the USB ports and should find your bootable Thumb Drive, Pen Drive, USB stick, Dongle, whatever you call it.
It is best to only put ONE Linux Distro on a Thumb Drive, others have more, but they have problems.
Once you are up and running, you can install your desired programs.

As an aside, he had a 16gb USB stick there with Lubuntu on it, but uses SUSE for most of what he does.
He looks to be around 17 or 18 years old, has a newer model car, but not real new, I would guess about 3 to 4 years old.

Now Dig This, I just had to ask him (since he had an expensive laptop) why he uses the library computer instead of just the free WiFi. He said WiFi is too slow for what he's downloading, these two library computers are nearly instant. I use them to download large files onto this Dongle (he had a spare USB stick), then I can load them onto my laptop or on my computer at home. We only have DSL at home and it is limited to so much data. No limits here at the library.
I casually asked what he downloaded that was so huge it would take forever. He cringed a little and said Just Streaming Videos is all.
I thanked him for the info and let him get back to what he was doing. Which was making downloads as we were talking. Looked like more than one at a time too.

I hope I didn't make any mistakes typing this from the several small notepad slips of paper I used off the library table, hi hi. The directions seemed pretty easy, so I'll bet you've already tried this and it didn't work for some reason.
User avatar
yogi
Posts: 9978
Joined: 14 Feb 2015, 21:49

Re: Testy Tessa

Post by yogi »

gary wrote:The directions seemed pretty easy, so I'll bet you've already tried this and it didn't work for some reason.

You know me too well, my friend. :lol: Yes, I have tried that with little success. But some success is better than no success.

Image

Allow me to explain the current status of my adventure.

[UEFI] In my efforts to create a bootable Linux OS on USB memory stick using UEFI boot, I read up on the format requirements. The disk format must be GPT in order to use UEFI. The first partition should be FAT32 formatted to the tune of only a couple hundred MB. That partition should have the 'boot' and 'esp' flags set to indicate it is where the boot action is going to take place. Then, they say to make a swap partition equivalent to the size of RAM; mine is less but it doesn't matter. Next would be the file system, ext4 being preferred. Another partition may or may not be added to store data. It should be NTFS if you are going to share with Windows; FAT32 will work too. So, I did all this using Gparted, and I was able to install Linux Mint 19.2 into the ext4 partition.

To test all this out I shut down the computer, plugged in the memory stick, and restarted. To my slight surprise SanDisk Partition 1 (my newly created USB stick) was now a boot option. I clicked on that, and it promptly booted into Windows ignoring the memory stick altogether. :thumbd:


[BIOS] A while back I learned how to create a bootable .iso image with persistence on USB memory by using a Linux app called mkusb. The goal here is to save stuff in the persistence partition of the bootable .iso image; something the library kid could not do? Additionally, this memory stick should boot without going through the Windows boot device selection menu. Just plug and play, so to speak. To check out the persistence I ran dist-upgrade and all the new kernel modules were indeed retained. All that works fine with Ubuntu 19.04.


So, why does that second stick boot and the first one I created manually will not? That's been the bugaboo all along. A close examination of the graphic gives a hint. The stick I made from scratch was all UEFI but the one created by the software appears to be BIOS. Note the flag settings on the extra partition of /dev/sdb. That first partition is clearly flagged as bios_grub; the file system is a “grub2 core.img. Until today every time I used Gparted to look at the partitions, that particular one was labeled “unknown.” And so it was. I had no idea what was in there. Also, Gparted does not mention how any disk is formatted. However, I verified using another partition manager that both /dev/sdc and /dev/sdb are GPT formatted.

The fact that both USB sicks are GPT formatted is not surprising. The mystery here is how does a GPT formatted disk recognize BIOS? I thought it had to be one or the other, not both. Apparently the compatibility is due to the fact that there is no MBR on any of the memory devices. Those partitions with BIOS firmware inside must be simulations. GPT simply will not boot with an MBR present.

The kids at the library must be coming in with bootable iso images of their Linux distros. They are using a second USB stick to store data, while I can do it with a separate partition Linux knows as /casper-rw, persistence. Since UEFI can simulate BIOS they can bring in anything they want on a live CD (or USB). I probably could do the same thing. BUT. I have demonstrated that it is possible for the Windows bootloader to recognize a random USB memory stick that is bootable. Recognizing it and booting from it at this point in time does not happen. My educated guess is the failure is due to the Linux installer not putting a copy of GRUB into that FAT32 partition. The software that creates "live" disks does.
User avatar
yogi
Posts: 9978
Joined: 14 Feb 2015, 21:49

Re: Testy Tessa

Post by yogi »

I want to say, also, that I am very appreciative of the fact that you have taken an interest in my perverse UEFI interests. You have gone out of your way to get information in support of my adventure. I am grateful. To be honest I am now questioning if what I am trying to accomplish is doable. It may not be, but I'm certain I've read about others who have mastered booting from removable media. The fact that I was easily able to do all this in an MBR/BIOS environment encourages me to keep trying. I've not read anywhere that says it is impossible by design in UEFI, although it is starting to look that way. In any case, thank you for all your note taking. :mrgreen:
User avatar
Kellemora
Guardian Angel
Guardian Angel
Posts: 7494
Joined: 16 Feb 2015, 17:54

Re: Testy Tessa

Post by Kellemora »

I know for a fact the two newest computers at the library are EFI for sure.
They boy went through every step to make his USB sticks for me.
He didn't have to use a separate USB stick to save data, he was only saving the videos to the second disk.
The work he was doing while that was running, he was saving to his original USB stick.
I'm pretty sure he said to use a 32 bit Live DVD or Dongle to install the OS on the second USB stick, which would then become the USB stick with the OS on it, plus a second partition for Data.

Unless there is some trick he didn't tell me about. I saw him plug the USB stick into the computer, reboot the computer, and up came the SUSE Distro.

One Question: Have you tried it with FAT instead of FAT32?
Seems he said something about FAT, but that was where he made his DATA area, not where he installed the OS. That went into the 10gb ext4 formatted partition.

I do hope you figure it out. I'll be going to the Library again on Friday, because another kid said the older man will be there then and he uses Linux. We'll see!
User avatar
yogi
Posts: 9978
Joined: 14 Feb 2015, 21:49

Re: Testy Tessa

Post by yogi »

I am in the middle of the next attempt and most likely will not have any updates until the next post.

At the moment it looks as if I did not get complete instructions on how to format a UEFI disk for Linux. What I mentioned above came from a couple blogs that all said the same thing. I figured if several people say the same thing it must be correct. The alternative explanation is that they just all copied the wrong information from one another. So, eventually I ended up on the Ubuntu official documentation Wiki page that explains how to install Grub, or fix a broken one. They say to do more or less what I have read in the blogs, but they add one more partition to the scheme. The Wiki claims all the Grub boot information is in that missing partition with the bios_grub flag set. I'm told to make it a I MB partition but Gparted wont make anything that small. Plus, Gparted wants to know the format for that partition, and that particular information is not mentioned in the Wiki. The important point is that the Ubuntu installer will put information into that partition with the bios_grub flag. The blogs say it all goes into the EFI partition. I know from experience the blogs are not telling the whole story.

When I fix the partitions on the USB memory stick, assuming I can, I believe I well have the removable media with a fully installed Linux OS I am aspiring to create. But, that's only half the problem. Even though I am booting the laptop from a live CD, and installing Linux from inside that environment, the Windows bootloader is being altered by the Ubuntu installer. Hopefully by using the correct partitions on the USB stick the Windows bootloader will be altered in a different manner. In the past the UUID of the removable memory has been written into the Windows bootloader. What I need is a set of instructions that will chainload to that USB port. I need the Grub that is in the laptop to point to and chain in the Grub that is in the memory stick. That seems to be the key to solving this whole problem.

Stay tuned for future developments. :mrgreen:
User avatar
yogi
Posts: 9978
Joined: 14 Feb 2015, 21:49

Status Report

Post by yogi »

My goal is to be able to install Linux, preferably Ubuntu, onto a memory stick that is bootable. There are two ways to do this.

The easiest way is to create a traditional Live CD/USB memory stick and to add a partition for persistence. I have done this successfully.

The second approach is to install Linux onto a GPT formatted USB stick (or any removable memory device) and use UEFI to boot into a fully functional operating system. The key to success here is to boot into a GPT disk while installing Linux. Not all versions of Linux can do this, but I'm told Ubuntu can.

In preparation for this type of installation the USB disk can be formatted in advance with at least three partitions; efi, swap, ext4 file system. Apparently it is also possible to allow the Ubuntu installer to use the entire disk without me partitioning it first. It will supposedly create the required partitions on it's own. I have not done that.

The problem at the moment is that the installation media, be it CD, DVD, or USB, is file formatted in FAT32 and the media itself is MBR, not GPT. This allows it to boot from almost any computer. However, because the installer is not running in the UEFI mode, it does some crazy things with GRUB. The GRUB image which allows the USB to boot is not written to the memory stick. It is placed in the Windows bootloader on the computer's hard drive instead. Thus, the Windows bootloader must be run first wherein it points to the USB memory via a UUID extracted from the stick during installation.

That all sounds reasonable until the USB stick is removed or replaced. Then the Windows bootloader fails back to the Grub recovery mode because it can't find the UUID it's looking for. There is a way, apparently, to get the Windows bootloader to chainload to the GRUB on the USB stick; in other words the Windows GRUB can pass the booting onto the USB GRUB. As of this post I have yet to figure out how that is done.

Sooo ... I've mastered the art of making live Linux installation memory sticks. I have yet to figure out how to install Linux onto a GPT formatted stick with UEFI booting.
User avatar
Kellemora
Guardian Angel
Guardian Angel
Posts: 7494
Joined: 16 Feb 2015, 17:54

Re: Testy Tessa

Post by Kellemora »

If you create a USB stick from a LIVE DVD or Dongle, it is not supposed to write to the machines HD at all.

I'm going back over to the library tomorrow and see if I can find someone who is using USB sticks who really knows how they are made.
One of the kids is just buying them ready to go, and I'm almost certain nobody can change the system data on those computers at the library. So I would assume they are not making any changes to the Windows bootloader at all.

Maybe I should ask one of the kids where they are buying them from, so I can run over there and find out straight from the horses mouth.

Will get back to you on this tomorrow night, if I have success at the library.
User avatar
yogi
Posts: 9978
Joined: 14 Feb 2015, 21:49

Re: Testy Tessa

Post by yogi »

If you create a USB stick from a LIVE DVD or Dongle, it is not supposed to write to the machines HD at all.
That is only partially true. Linux installation onto USB memory, which you describe so well from your library visit, involves transferring data from the memory stick with the .iso image to a blank memory stick. The blank memory stick will be a full working operating system when installation is complete. This can only happen because it is taking place on a computer which allows data transfer in this fashion. So far, so good.

I'll speak to Ubuntu because that's what I've been experimenting with lately. Other OS's might work differently. The Ubuntu installer is capable of installing the OS to any storage device on the computer, To that end there is a built in partition editor, not too unlike Gparted. That is where you select the target disk and/or partition for installation. In addition to that selection there is another choice to select where GRUB, the Linux bootloader, is to be installed. The default is to the first drive, first partition. That would be where Windows demands to be installed. So, if you are not careful, and you don't change where to put GRUB, the Linux installer will write a copy to the hard drive. Taking that into account, I carefully select the target USB stick and the efi partition thereon. Then click "install now" It's hands off from there until the installation is complete.

The next step would normally be to remove the installer USB and leave the target USB with Ubuntu in place. Power up the machine and what do you think should happen?

I'll tell you what DOES happen in my case. The Windows bootloader starts because the UEFI BIOS burned into the firmware of my laptop does not see any DVD, nor USB, memory that is bootable. The last choice is the hard drive with the Windows bootloader. Oddly enough, the Windows bootloader knows there is a bootable memory device out there. It knows because it has the UUID of that device AND the name of the OS thereon. Thus the Windows bootloader sends me to the GRUB on the memory device so that I can continue the booting into Ubuntu.

I did not tell the Ubuntu installer to install GRUB on the hard drive. In fact I deliberately selected the memory stick. But that's not what Ubuntu did in spite of my instructions.

OK, if that's the way you want to play the game, then fine. Windows wins control of the boot selection device war. However, the battle for picking the correct boot device is still in progress. The Window bootloader can be configured to chainload whatever is out there on USB or other memory device. That chainloading script never changes (is my guess). It points to bootable memory device of unknown UUID. Well, it WOULD do that if I knew how to make it do that. Whoever set up the library computer knows the secret.
User avatar
Kellemora
Guardian Angel
Guardian Angel
Posts: 7494
Joined: 16 Feb 2015, 17:54

Re: Testy Tessa

Post by Kellemora »

I'll be leaving to go up to the library in about 20 minutes, perhaps I can ask the person who attends to the computers if they have done something.

I do remember this though, from something someone else said a while back, you DO have to make the USB stick Bootable, Like you do for a LIVE USB Stick, and NOT remove the Bootable part.
Perhaps that is what instruction is missing. But then doesn't an install mess that up anyhow?

I've written down the questions to ask and see if I can get an answer for you.
User avatar
yogi
Posts: 9978
Joined: 14 Feb 2015, 21:49

Re: Testy Tessa

Post by yogi »

Funny you should bring that up. There are instructions all over the web regarding how to make bootable USB sticks. Like hard drives they may be created in MBR or GPT format. All those "live" versions of an OS are MBR with FAT32 file systems. That's why they work as well as they do. Most any UEFI computer can boot that kind of thing. FInding instructions on how to create a bootable GPT/UEFI USB stick is a little trickier. The partition scheme shown in the image I posted is the correct one. However, when going UEFI only, the .iso files need to be copied (Linux dd command) to the ext4 partition.

There are two issues with my dilemma. One is that the code for booting (GRUB) needs to be on the USB stick. Apparently there is a special GRUB that needs to be installed for UEFI booting. I can't prove that Ubuntu actually installs that.

The second issue is that all the bootable devices are listed in the Windows 10 UEFI bootloader. I can make it recognize any one USB stick. I cannot make it recognize anything but that one stick.

My instincts tell me the Windows bootloader has to be modified in order to do what I am trying to do. In addition to that modification, the Linux distribution of interest must be capable of booting UEFI. Ubuntu and Mint are clear about their ability to boot UEFI and that's all I'm working with at the moment.
User avatar
Kellemora
Guardian Angel
Guardian Angel
Posts: 7494
Joined: 16 Feb 2015, 17:54

Re: Testy Tessa

Post by Kellemora »

I'm back, after spending over 2-1/2 hours at the library.

Honestly Yogi - I'm now more confused than ever.

The first guy I talked to said he just uses Rufus to install and .iso image, and tried to explain persistence so changes would be save. But with a warning. A Pen Drive does not last more than three months if you add persistence. Which is why he uses a second USB stick to place his files on that he needs to save.

The second guy makes his USB sticks using terminal. He started to tell me how he does it, but I got lost after the first couple of instructions. So thanked him and moved on, mainly because the guy I wanted to talk to came in.

He may be the most helpful too.
What he said he does is create a bootable LIVE thumb drive first using Lubuntu since it is small.
Then he uses Gparted, the one in Lubuntu, to partition the thumb drive and shrink the partition with the .iso down, but leaves at least 30 extra megs for it to run in. He creates a swap partition of about 4 gigs. Then divides the rest of the thumb drive into two partitions one to install the desired OS and sets this partition as ROOT, and one for Data, If a Linux OS like Ubuntu he uses ext4 for the two partitions. If he is installing Windows 7, he formats the partitions NTFS. Do not name the partitions yet. He added it gets complicated installing Windows. I said we only need to install a Linux OS, so he skipped whatever he was going to say about that.

From here you have two options:
One is to install Virtual Machine, not Virtual Box or to install the Distro of choice.
He does not use Virtual Machine or Box because it slows everything down.
Download an ISO to your last partition.
Reboot into Lubuntu, and use it to select and install the OS on your last partition to the partition you want to use for the install, in this case the second to last partition.
This will also install grub to the Lubuntu bootloader.
When the installation is finished and you boot up the thumb drive, you should get Grub showing Lubuntu or your selected OS. If you get Windows, then you have to press esc, F1, F12, whatever to let you boot into set-up select boot from USB first, DVD second, HD third. He did say the computers here at the library are already set to boot from DVD if so equipped and USB second, if not DVD drive, then the computer checks USB first.
You will not be able to upgrade Lubuntu at all, since it is a LIVE Distro.
You should be able to upgrade everything in your chosen installed OS except the Kernel. If you want to upgrade the Kernel, you have to reinstall Lubuntu, which unfortunately wipes the entire thumb drive.
DO NOT DELETE the Lubuntu Live Install, it is what makes the thumb drive bootable from any computer.

Hope this works!
Now I've got to get to the rest of my days work.
User avatar
yogi
Posts: 9978
Joined: 14 Feb 2015, 21:49

Re: Testy Tessa

Post by yogi »

I can't thank you enough for all the effort you are putting into this project of mine. Hopefully you too are getting at least a little bit of enlightenment out of it all.

Rufus is one of several programs that can make a bootable iso image. One of the things I learned using Rufus is that iso is a file system onto itself, much like NTFS, ext, Fat, et al.. It requires a FAT32 partition for installation and the combination of the two is what makes a live CD bootable on just about any computer that knows what a USB port is. I tried maybe half a dozen programs and settled on BallenEtcher when using Windows and mkusb when using Linux. EIther one works very well.

Persistence is just an optional partition used for storage on a live system. I guess it depends how much reading and writing one does but my memory sticks go well beyond three months life expectancy. One of the downsides of using a live disk with persistence is that it does not have codecs for various media players. Those things get put in place after you install the OS. For me that means things like Twitter and Tweetdeck do not work very well because there is no video capability on an iso. I tried to figure out which ones need to be installed and would put them in the persistent partition. Good luck with that, NOT. LOL Anyway, my point is that live disks are fine but not fully functional as would be an installed version of a given OS.

There are indeed command line utilities in both Windows and Linux that can be used to format a USB stick and copy over an iso image. But, I see no advantage to do it that way because the GUI is so easy to use, especially in Etcher. It's literally two clicks and you're done.

That guy you waited for to show up is indeed the most helpful. There are more ways than one to skin a cat, or to install Linux on removable media. What he told you about multiple partitions to accommodate two versions of Linux is brilliant. The live partition is what makes it bootable and the installed partition is very close to what I've been trying to achieve. If the USB stick is big enough I can see putting several OS's on it which would be even better than what I was doing on the old MBR laptop that started this whole project. The downside is that I have a supply of 32GB and 64GB USB memory sticks. It would be a tight fit on the smaller one because only 28GB is free after formatting the disk. Ubuntu needs a full 25GB to work at speed. Lubuntu is smaller and might be well suited for such a memory stick, but probably doesn't have all the features I'd like to see. In any case, I will try to do the dual OS thing on a 64GB stick and see what happens.

There is another way to go about this and I found the article that describes it: https://www.zdnet.com/article/hands-on- ... ot-part-2/ This author, J.A. Watson, actually wrote a series of articles laying out the whole process in great detail. What I linked to is for you to peruse. I don't expect you to understand much of it, but it will show you what actually has to be done to boot any USB memory stick in the UEFI mode along side a Windows installation. Basically it amounts to making GRUB the master bootloader instead of what I have now, i.e., the Windows bootloader. Then the GRUB config file must be modified in a special way. In addition to that the chainloading routine must be used in order to accommodate GRUB vs Windows bootloader. Two different animals living in two different worlds. This is a very tedious method, but the end results produces exactly what I am looking to do. Or, so says J.A. Watson.

Then, there is the option for me to just rebuild the MSI computer hard drive to be a clone of what I had before. That means making GRUB the master boot controller and relegating Windows to just another selection option on the GRUB menu. This kind of setup would resemble an MBR configuration and I'd probably have to do something to the BIOS settings in order to get it to work. Considering that MSI doesn't support Linux, and certainly not multibooting into Linux, the necessary switches may not even be included in the BIOS firmware. That's one reason I have not simply given up on UEFI and tried to clone the old computer.

All things considered, your investigation was very enlightening. The library computer boot scheme does not have to be altered at all in order to boot into live disks. That seems to be what everybody there is doing in one form or another. As I noted in the past, I can do that. Unless I discover something new, I've come to the conclusion that what I would like to do is damned near impossible. It's not just that Windows is messing things up by demanding UEFI. Linux UEFI distros apparently are not yet a common thing. Ubuntu and MInt can do it for sure. Nobody else is bragging about it, although I read that Fedora accomplished it first many years ago. It just reinforces my bias against Linux in that it seems to be playing catch-up; very slowly.

Thank you, yet again. I REALLY appreciate your efforts.
Last edited by yogi on 17 Aug 2019, 16:33, edited 1 time in total.
User avatar
Kellemora
Guardian Angel
Guardian Angel
Posts: 7494
Joined: 16 Feb 2015, 17:54

Re: Testy Tessa

Post by Kellemora »

That was an interesting read Yogi!

I think basically what the guy was telling me was that he uses a LIVE OS only for the purpose of booting up the thumb drive from the Windows 10 UEFI computer. He does not do his work using the Live OS, in his case Lubuntu.
On another partition he has INSTALLED the normal Ubuntu OS, not running it as a Live OS, but as full-install.
During the installation process, it added or changed GRUB on the Lubuntu partition, which has small partitions associated with it.
Then of course he has his DATA Partition where he stores his work. I'm thinking he doesn't save to his /home directory on the OS partition. Installed programs are also on the OS partition, and he can upgrade the OS, but not the kernel, since the kernel in use is the one on the Lubuntu Live OS.

I'm pretty sure he was using 64gig USB Sticks, but one I know was 32gig because it was stamped on the stick.
I have a few USB sticks that don't say what size they are, but they are all 32gig.

I have not yet had a chance to go by the computer shop who sells ready-to-use USB sticks with the OS already installed.
And this appears to be what most of the kids who are running Linux are using.

I did ask one of the kids why they were using a Linux Distro on the library computer.
They don't like Windows10 for one, but also the library computer does not have some of the programs they have on their Windows 7 or 8 laptops. So they are doing most of their stuff on LInux because the programs are free.
User avatar
yogi
Posts: 9978
Joined: 14 Feb 2015, 21:49

Re: Testy Tessa

Post by yogi »

It only took a month to come to the understanding I was able to depict above. I'm certain there are a few things I do not know yet, but I think I have the basic requirements down and documented. At some point in the not too distant future I'll be trying to create a USB stick with two installations of Ubuntu, one an iso and the other a full install. If what you say is true, i.e., the kernel cannot be updated, then this is not what I want to do. The kernel from the iso is indeed what gets transferred to the installation, but it is typically not the latest kernel. They update the Linux kernel almost weekly. A full install should have no trouble updating because unlike the iso, the system files are not read-only. An iso cannot be updated because all the files there are read-only as a stable image should be. You can be sure that I'll be testing out that scenario early on.

Kids would have an interest in using the library computer for various reasons. One of the major reasons is that their home computer doesn't have the same resources. Their home computers are also, very likely, well monitored by their parents. Keeping it all on USB memory would also retain a high degree of anonymity. Download the porn on the library computer and view it on the home computer without a record of such. LOL Since I've been in both worlds I'd have to question the kids further to see what Linux can do that Windows can't. Seems unlikely to be entirely true. It IS free, I'll grant them that much.

I'll bet you a box of donuts that the shop selling Linux on a stick is selling iso live versions. It is also possible that he is selling portable virtual machines. That's something I have not looked into yet but sounds intriguing. The portable virtual machine idea will not work on machines that have VirtualBox (or VMware) installed so that a live USB would be more universal. Anyway, I probably will look into it whether or not the dual-OS scheme works for me. It's always nice to have options.
User avatar
Kellemora
Guardian Angel
Guardian Angel
Posts: 7494
Joined: 16 Feb 2015, 17:54

Re: Testy Tessa

Post by Kellemora »

I think the problem is, maybe, the kernel loads before Grub.
However, if that is the case, then none of the Linux Distro's on my computer would work, because they all have different kernels.
By the way I'm thinking, which may not be right. You are booting up an OS from the USB Stick after getting to Grub. And since it is a full-install you are booting into, I don't know why it wouldn't use the kernel for that install.
You cannot upgrade the LIVE OS, and it is only used to make the USB stick bootable, and open Grub.
But once you are in Grub, and booting the Installed OS from Grub, seems to me it would use the right kernel.
And since the Installed OS can be upgraded, I don't know why the kernel couldn't be upgraded along with an upgrade.

I've watched enough of these kids now to see those who have the store bought pre-loaded sticks, they only have one OS on them. Usually Linux Mint.
On the new computer, they turn it off and back on again, then when the motherboard screen comes up, they press F12 and select boot from USB, although from what I understand they don't have to press F12 on any of the other computers, just the two brand new ones. I guess they were not set up the same way yet.
I watched closely as two have booted up, and there is no grub screen coming up, the next thing you see is the Linux Mint screen.
On the desktop screen, besides the normal icons, there is sometimes an Icon for the Data Partition, which appears as another drive on the desktop. Apparently whatever they have on the desktop is saved to the USB stick in the Distro Partition, and they may save a copy in the Data Partition as well.
I say this because this kid was working on his homework, and it came up right on the desktop after Mint opened.
What I don't know is if he had opened it from the Data Partition and just left it on the desktop.

The thing about a Live USB stick is you always get a window to Run or Install, these store bought sticks are not doing that.
Well, I take that back sorta. If they have more than one OS on the stick, then they will see Grub, and in Grub you see the Live OS, and the Installed OSs. But I don't know if the ones showing Grub are bought sticks or not.

I also learned something else I forgot to mention, the bought sticks will only work on Windows 7, 8, or 10, will not work on older XP computers. I think they have to be UEFI computers is why.

Only about 2 out of 10 of the kids using the library computers are using USB sticks with an OS on them. All the rest just use a USB stick to save their data.

You may have hit the nail on the head with your opening comment. A lot of websites are blocked by the library computers parental control features. So is sending out more than about 5 e-mails. So maybe by using their own USB stick, they can access their e-mail accounts and send out as much e-mail as they want. It could be also websites like SnapChat and Instagram are blocked on the libraries computers too. I don't know since I've never used those websites.

I was really surprised to see how many are using Linux from the library, must be a reason they are not telling me, hi hi.
User avatar
yogi
Posts: 9978
Joined: 14 Feb 2015, 21:49

Re: Testy Tessa

Post by yogi »

Grub always is used to call up the Linux OS. Thus, on power-up Grub is read first. There can be many instructions and scripts embedded in Grub, but there are always two lines at the end
  • Linux /boot/vmlinuz-5.0.0-25-generic ... ... ...
    initrd /boot/initrd.img-5.0.0-25-generic
The first line I quote is calling up the kernel. The second line is calling up a map of all the drivers and hardware attached to the OS. Both are stored in the /boot directory of any Linux OS. While booting, if you ever saw a page fill up with hundreds of lines of what looks like system and boot log entries (because that's what they are) you will have seen the order in which things are done to bring up the OS. Whether you see that rolling list of instructions or not during startup is determined by an instruction in Grub by the way. Thus if the "nosplash" instruction is given you see the rolling list. If the "splash" instruction is given you go right to the Mint (or whatever) splash screen instead. The list of commands is still running and recorded in the system logs, but you don't see them in that case.

The iso image used to install the OS, of course, needs a kernel in order to do it's thing. A Linux kernel was used to compile the iso image, and as such is used by the installed operating system. The kernel is stored in that vmlinuz file that Grub calls up. That means the installed OS has a copy of the iso kernel. Once the installed OS is up and running the user has the option to update the kernel, assuming updates are available. And they almost always are available because the Linux kernel being used today is not the same one used the day the OS was released for the first time. The kernel with the updates is written into vmlinuz and the suffix is upped appropriately. So, when you boot the next time, you have a choice. Boot from the old kernel or boot from the updated one. If you have a bunch of old kernels, Grub will spell those out for you under the Advanced Options menu.
On the new computer, they turn it off and back on again, then when the motherboard screen comes up, they press F12 and select boot from USB, although from what I understand they don't have to press F12 on any of the other computers, just the two brand new ones. I guess they were not set up the same way yet.
That observation is somewhat startling. Pressing F12 (depending on the computer manufacturer it may be some other key) to select a device from which to boot is an MBR BIOS procedure that is not present in UEFI. I no longer have that option in my new laptop because it is UEFI, and that is the exact reason I am having problems with Linux and UEFI. I cannot select the boot device. UEFI bootloaders have taken over that task. Thus, while I could be misinterpreting what I'm reading, it seems the two newest library computers are not set up for UEFI boot. This is remarkable because Windows 10 and Windows 8 will not boot from or install to an MBR formatted disk.

Also, if what you are saying is correct, that the USB sticks can run Windows 7, 8, and 10, I don't understand how the USB stick is formatted. It must be MBR for Windows 7 and GPT for Windows 8 and 10. They are different disk formats and cannot coexist on the same memory device.

The implication is that the USB sticks which can be selected by pressing F12 must be fully installed OS's. An iso image would simply boot immediately and not require a selection from the user. So, maybe, the USB sticks some of the kids bring to the library have both.

Again, I may be misreading what you are posting, but some of the kids obviously have iso images with persistence on their USB sticks. In addition to the OS being on a partition, there is a second partition labeled casper-rw. That is the persistence storage space. Depending on what software was used to create the USB image, an icon linking to the persistence partition may or may not be present. Regardless, the persistence partition is accessible via the regular desktop file manager. Anything downloaded by the iso image can be stored permanently in that persistence partition. That's why it's important to know in advance with whom you will be sharing that partition. If you will be using Windows to read the data in persistence, that partition must be NTFS or FAT32 formatted. If Windows will never be involved, then ext4 would be a good file format choice.
User avatar
Kellemora
Guardian Angel
Guardian Angel
Posts: 7494
Joined: 16 Feb 2015, 17:54

Re: Testy Tessa

Post by Kellemora »

I don't know why they have to press F-12 on the two new computers. I do know both of those computers are Windows 10.
Perhaps the library re-mapped the F-12 key to look for a USB stick to boot from.
On all the other computers, all they have to do is turn them off, wait a second, then turn them back on. If they have a DVD in the drive, it will boot from that, if not, it will boot from the USB stick. If no DVD or USB stick, it will boot from HD Drive C.
If they do not press the F-12 key on the new computers, it will boot straight into Windows 10, they have no DVD drive at all installed on those two new machines.

I have my Linux Distro's set to show me the code while booting up. I like to see it doing something other than staring at the splash screen, hi hi.

The gal who works the counter at the library knows nothing about the computers, the main library sends out someone if one quits working, and they are not to fast on getting there either.
Now, if the problem is with their card catalogue computers, they can fix those from the main library without coming out.
Well, unless the machine is physically broken.
User avatar
yogi
Posts: 9978
Joined: 14 Feb 2015, 21:49

Re: Testy Tessa

Post by yogi »

Obviously I have no way of knowing what the library computers are doing. All I know is the familiar sequence you described. Truth be told those iso images will boot right up on most computers without any intervention if the computer firmware boot order is as you describe. The HDD should always be the last choice.

I'm like you and prefer to see the boot sequence rolling by during start up. Unfortunately I have to see those things when I'm troubleshooting nVidia problems. That's where some important error messages are displayed. I could look at the boot.log file too, assuming I can get into the system. But some of those logs are tens of thousands of lines in length. Anyway, it's easy enough to flip back and forth between splash and nosplash; pressing esc key will do it.
User avatar
Kellemora
Guardian Angel
Guardian Angel
Posts: 7494
Joined: 16 Feb 2015, 17:54

Re: Testy Tessa

Post by Kellemora »

I changed the splash screen on one old computer (the one I use for accounting) to the super old WANG PC splash screen.
It will hang there until I hit any key, then the log-in screen will come up with the normal Debian splash screen.
Seems I had to add a line of code to make it pause, but it was so long ago I did this, I don't remember for sure.
It is not connected to the Internet so I get no upgrades on that machine, unless I hook it up to do so.

I have yet another computer heating up and shutting down. I probably need to open it up and blow the dust out again.
I'm lax on doing that because I have to move all the monitors off the top of the computer cases, then move two computers out of the way to get to the back one on the row of three. Which means disconnecting everything first and connecting everything back up when I'm done. Takes almost two hours to do all of that with all the computers lined up on the other desk. 3 in the front row, 5 in the back row, 2 of those are the little tiny computers, 1 is Debi's new one with Win10 she hates. I did try downloading a whole new version of Win10 and installing it. Made no difference in the speed, although it did have a couple of features not found in the original upgrade from Win8 to Win10.
Post Reply