Puzzling bug booting EasyOS from USB stick

Moderator: BarryK

User avatar
CF-DKS
Posts: 51
Joined: Fri Apr 08, 2022 6:41 pm
Has thanked: 11 times
Been thanked: 9 times

Re: Puzzling bug booting EasyOS from USB stick (Solved, sorta.)

Post by CF-DKS »

Caramel wrote: Wed Mar 27, 2024 8:12 pm

To be sure execute (when EasyOS works)

Code: Select all

cat /mnt/wkg/.zramtl.flg 

It must be 0.

We will have to look into the init script to understand.

Edit : lines 741 to 754 of init (EasyOS 5.7)

Code: Select all

CNT=0; Pb=0; Pw=0
[ "$WKG_LABEL" == "EASYOSZRAM" ] && WKG_DEV="zram0" #190706 200822
[ -e /dev/scd0 ] && rm -f /dev/scd* #190706 static dev nodes, these duplicate sr* nodes.
while [ $CNT -lt 20 ];do #drives may take couple seconds to become available. 180415 increase 8 to 20.
 sleep 1
 echo -n '.'
 CNT=$(($CNT+1))
 #190718 iso written to usb-stick has (ex:) /dev/sdd and dev/sdd1 both LABEL="EASYOSOPTICAL", filter-out former...
 BLKIDS="$(blkid | grep -v '[a-z]: ')"
 #ex line: /dev/sda2: LABEL="intern1p2" UUID="cd5ef69b-883d-4744-bc1d-551154131db2" TYPE="ext4"
 [ ! "$WKG_DEV" ] && WKG_DEV="$(echo "${BLKIDS}" | grep -E "\"${WKG_UUID}\"|\"${WKG_LABEL}\"" | cut -f 1 -d ':' | cut -f 3 -d '/')"
 [ "$WKG_DEV" ] && break
done
[ ! "$WKG_DEV" ] && WKG_DEV="zram0" #190714

Line 744

Code: Select all

while [ $CNT -lt 20 ];do #drives may take couple seconds to become available. 180415 increase 8 to 20.

Maybe 20 is too small for your old desktop

I tried that with this result:

coderesult.jpg
coderesult.jpg (14.54 KiB) Viewed 579 times
Caramel
Posts: 476
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 100 times
Been thanked: 78 times

Re: Puzzling bug booting EasyOS from USB stick (Solved, sorta.)

Post by Caramel »

CF-DKS wrote: Wed Mar 27, 2024 8:34 pm

I tried that with this result:
coderesult.jpg

It is equivalent to 0 in zramtl.flg and corresponds to no lockdown in ram.

In the init script, if the working partition is not find, easy is run in zram (see init, comment line 10)

Here "find the working partition" use the blkid command. The loop and the comment (line 744) seems to indicate the hardware may not respond instantly and may require some time.
Maybe the 20 in the loop is sometimes insufficient with your desktop.

EDIT:
A thing to test : modify init and change 20 to a bigger number (100 for example) (EDIT2 BAD IDEA : or comment this part in init (useless if you use EasyOS on usb stick, obtained with easydd))

Last edited by Caramel on Thu Mar 28, 2024 6:24 am, edited 1 time in total.
williwaw
Posts: 1948
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 172 times
Been thanked: 369 times

Re: Puzzling bug booting EasyOS from USB stick (Solved, sorta.)

Post by williwaw »

CF-DKS wrote: Wed Mar 27, 2024 8:34 pm

I tried that with this result:

is wkg actually the name of your easyos install folder?

maybe just look in the install folder with rox and left click on the "eye"

User avatar
CF-DKS
Posts: 51
Joined: Fri Apr 08, 2022 6:41 pm
Has thanked: 11 times
Been thanked: 9 times

Re: Puzzling bug booting EasyOS from USB stick (Solved, sorta.)

Post by CF-DKS »

Caramel wrote: Wed Mar 27, 2024 9:04 pm
CF-DKS wrote: Wed Mar 27, 2024 8:34 pm

I tried that with this result:
coderesult.jpg

It is equivalent to 0 in zramtl.flg and corresponds to no lockdown in ram.

In the init script, if the working partition is not find, easy is run in zram (see init, comment line 10)

Here "find the working partition" use the blkid command. The loop and the comment (line 744) seems to indicate the hardware may not respond instantly and may require some time.
Maybe the 20 in the loop is sometimes insufficient with your desktop.

EDIT:
A thing to test : modify init and change 20 to a bigger number (100 for example) or comment this part in init (useless if you use EasyOS on usb stick, obtained with easydd)

You are pushing my comfort level. I haven't messed with programming since the early days of DOS and was happy to leave command line behind. The thing I am not understanding is how doing the same thing produces different results. FWIW, I have been using Easy Dunfell daily for over two years, and it has been rock solid, never a problem booting or running. Kirkstone 5.6.1 I have been using for a few months, not daily but booting reliably when I use it. I just ran into issues trying to create a USB with the latest version of Easy for a friend, and here we are. Since I have been dialing it back to previous versions and still having issues makes me wonder what is different. That, and the curious fact that so far I have not had this occur on two laptops, just the desktops. I also have Easy installed to the hard drive on another laptop, where it has been working fine. (yes, I have a lot of cast off computers around, when my friends and relatives replace one I get the old one, so I have lots to experiment on). Don't know if this is relevant, but both desktops have i54570@3.20Ghz processors.

Caramel
Posts: 476
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 100 times
Been thanked: 78 times

Re: Puzzling bug booting EasyOS from USB stick (Solved, sorta.)

Post by Caramel »

CF-DKS wrote: Thu Mar 28, 2024 12:08 am

The thing I am not understanding is how doing the same thing produces different results. FWIW, I have been using Easy Dunfell daily for over two years, and it has been rock solid, never a problem booting or running. Kirkstone 5.6.1 I have been using for a few months, not daily but booting reliably when I use it. I just ran into issues trying to create a USB with the latest version of Easy for a friend, and here we are. Since I have been dialing it back to previous versions and still having issues makes me wonder what is different. That, and the curious fact that so far I have not had this occur on two laptops, just the desktops. I also have Easy installed to the hard drive on another laptop, where it has been working fine. (yes, I have a lot of cast off computers around, when my friends and relatives replace one I get the old one, so I have lots to experiment on). Don't know if this is relevant, but both desktops have i54570@3.20Ghz processors.

The assumption is your desktop takes too long at boot to see the partition where easy.sfs is located. I think your PC is aging. Maybe after a reboot, it is faster.

To test the assumption, you could replace the original initrd by a modified initrd (Rename the original to save it)
Init modified (Easy 5.7)
https://www.swisstransfer.com/d/52437ca ... cd7b8d31fd

Caramel
Posts: 476
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 100 times
Been thanked: 78 times

Re: Puzzling bug booting EasyOS from USB stick (Solved, sorta.)

Post by Caramel »

williwaw wrote: Wed Mar 27, 2024 9:29 pm
CF-DKS wrote: Wed Mar 27, 2024 8:34 pm

I tried that with this result:

is wkg actually the name of your easyos install folder?

maybe just look in the install folder with rox and left click on the "eye"

@williwaw
If Easy do not run in ram, /mnt/wkg is a symlink to /mnt/wkg_dev/wkg_partition ( usually /mnt/sdb2/easyos/ for a usb stick)

User avatar
CF-DKS
Posts: 51
Joined: Fri Apr 08, 2022 6:41 pm
Has thanked: 11 times
Been thanked: 9 times

Re: Puzzling bug booting EasyOS from USB stick (Solved, sorta.)

Post by CF-DKS »

Caramel wrote: Thu Mar 28, 2024 6:07 am

The assumption is your desktop takes too long at boot to see the partition where easy.sfs is located. I think your PC is aging. Maybe after a reboot, it is faster.

O.K. but that doesn't explain why the sticks I normally use boot first time every time in both older desktops, also true if I swap them. I am pursuing another possibility. The two always reliable USB sticks were created out of Windows with Etcher, the others with EasyDD. I'm going to try going the Etcher route and see if the problem recurs. But first I have to visit the dentist! Not my favourite thing to do.

User avatar
Federico
Posts: 288
Joined: Tue Jun 20, 2023 2:40 pm
Has thanked: 1 time
Been thanked: 36 times

Re: Puzzling bug booting EasyOS from USB stick

Post by Federico »

Desktops usually have an internal cable which connects the USB headers on the motherboard to the physical ports on the front of the case. This cable introduces latency, and there may also be electromagnetic interference. So make sure to connect your USB stick directly to the motherboard (on the back of the case).
The point of the question is to understand that basically, although it is very comfortable to keep an operating system on a USB stick, the flash memory itself wasn't invented for this purpose. The purpose of the technology was just to store data somewhere, not to run an operating system. Still many models of USB stick will fail when trying to run a portable OS on them.
The fact that a good quality USB stick will do the job, and doesn't even cost a fortune, is a sort of miracle of the modern era. But no one should commit the error of thinking that since it worked once, in a certain situation / scenario, it will work furtherly in every possible scenario. Basically, that is not the use which the products were thought for: neither the USB stick itself nor the UEFI BIOS of your desktop PC. For sure the BIOS expects that the user could want to boot an OS from an external USB drive, but probably not from a flash memory (that function is probably tested by using external SSDs, HDDs or optical drives). So yes, it may be too slow or too fast for detecting the partitions on the stick. And obviously, results may vary a lot from PC to PC.
Laptops are usually better suited / fitted for this kind of usage. The reason for that is probably that since they don't include any optical drive any more (I don't see anyone around still using laptops with a DVD drive), it has been very important for the designers to avoid at all cost the situation in which the user isn't able to boot for any possible reason.

Desktop PC
Case: Sharkoon S25-W MB: Asus Rog Strix B550-A PSU: XFX Pro 750W CPU: AMD Ryzen 5700X @ 4.6 GHz RAM: Corsair 32 GB DDR4 @ 3000 MHz Heatsink: Scythe Mugen 5 rev. B VGA: Asus Tuf RTX 3080 12 GB OC

Laptop PC: Asus Zenbook UX325E

User avatar
CF-DKS
Posts: 51
Joined: Fri Apr 08, 2022 6:41 pm
Has thanked: 11 times
Been thanked: 9 times

Re: Puzzling bug booting EasyOS from USB stick

Post by CF-DKS »

Federico wrote: Thu Mar 28, 2024 1:07 pm

Desktops usually have an internal cable which connects the USB headers on the motherboard to the physical ports on the front of the case. This cable introduces latency, and there may also be electromagnetic interference. So make sure to connect your USB stick directly to the motherboard (on the back of the case).
The point of the question is to understand that basically, although it is very comfortable to keep an operating system on a USB stick, the flash memory itself wasn't invented for this purpose. The purpose of the technology was just to store data somewhere, not to run an operating system. Still many models of USB stick will fail when trying to run a portable OS on them.
The fact that a good quality USB stick will do the job, and doesn't even cost a fortune, is a sort of miracle of the modern era. But no one should commit the error of thinking that since it worked once, in a certain situation / scenario, it will work furtherly in every possible scenario. Basically, that is not the use which the products were thought for: neither the USB stick itself nor the UEFI BIOS of your desktop PC. For sure the BIOS expects that the user could want to boot an OS from an external USB drive, but probably not from a flash memory (that function is probably tested by using external SSDs, HDDs or optical drives). So yes, it may be too slow or too fast for detecting the partitions on the stick. And obviously, results may vary a lot from PC to PC.
Laptops are usually better suited / fitted for this kind of usage. The reason for that is probably that since they don't include any optical drive any more (I don't see anyone around still using laptops with a DVD drive), it has been very important for the designers to avoid at all cost the situation in which the user isn't able to boot for any possible reason.

Thanks for this. It makes sense to me. I had been considering replacing Windows with Easy as the O/S on my primary desktop, and I may end up doing that. In the meantime, I do boot from the front ports because they are USB3 and the back ones on this computer are USB2. I did create another USB Kirkstone 5.7 with Etcher, I flashed it with a laptop and have booted it numerous times with no issues on my secondary desktop, but on this desktop it isn't recognized and Windows boots from the hard drive. Go figure.

User avatar
Federico
Posts: 288
Joined: Tue Jun 20, 2023 2:40 pm
Has thanked: 1 time
Been thanked: 36 times

Re: Puzzling bug booting EasyOS from USB stick

Post by Federico »

Yes. To point out the situation jet better, you will for sure kmow about the Apollo 13 odissey. When they arrived to the moon, they were off-course. So, for correcting speed and direction they used the landing engine of the lunar module to slow down.
As we all know, it worked.
That's exactly what we do when we use any OS on a flash drive.
Even if something works, that doesn't mean that it was made for the purpose. Or, better said, we have the possibility but not the certainty.
So, if you would like to use Easy on a desktop, it would be better (more relyable) to install it on a patition of an internal drive. If you don't have the skills for doing that or simply you aren't willing to do that, because you want to keep all the advantages of a portable OS, you should at least research a little bit and find a desktop on which the system works well, or a particular model of USB stick which perfectly suits the bios of your desktop. This is my opinion about the topic.

Desktop PC
Case: Sharkoon S25-W MB: Asus Rog Strix B550-A PSU: XFX Pro 750W CPU: AMD Ryzen 5700X @ 4.6 GHz RAM: Corsair 32 GB DDR4 @ 3000 MHz Heatsink: Scythe Mugen 5 rev. B VGA: Asus Tuf RTX 3080 12 GB OC

Laptop PC: Asus Zenbook UX325E

User avatar
CF-DKS
Posts: 51
Joined: Fri Apr 08, 2022 6:41 pm
Has thanked: 11 times
Been thanked: 9 times

Re: Puzzling bug booting EasyOS from USB stick

Post by CF-DKS »

Federico wrote: Thu Mar 28, 2024 2:32 pm

Yes. To point out the situation jet better, you will for sure kmow about the Apollo 13 odissey. When they arrived to the moon, they were off-course. So, for correcting speed and direction they used the landing engine of the lunar module to slow down.
As we all know, it worked.
That's exactly what we do when we use any OS on a flash drive.
Even if something works, that doesn't mean that it was made for the purpose. Or, better said, we have the possibility but not the certainty.
So, if you would like to use Easy on a desktop, it would be better (more relyable) to install it on a patition of an internal drive. If you don't have the skills for doing that or simply you aren't willing to do that, because you want to keep all the advantages of a portable OS, you should at least research a little bit and find a desktop on which the system works well, or a particular model of USB stick which perfectly suits the bios of your desktop. This is my opinion about the topic.

Yes, well, the USB with Dunfell I have been using daily for over two years works perfectly on my primary desktop, and I am happy with it. The Kirkstone USB I created to use on my secondary desktop (which lacks a hard drive, so no choice there unless a dedicated external drive) has worked without issues on both desktops. If I hadn't gotten the notion to create an Easy USB drive for my friend I might never have experienced this anomaly, but it has been a useful learning experience. Thanks to all for suggestions and advice, much appreciated.

Caramel
Posts: 476
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 100 times
Been thanked: 78 times

Re: Puzzling bug booting EasyOS from USB stick (Solved, sorta.)

Post by Caramel »

CF-DKS wrote: Thu Mar 28, 2024 9:23 am
Caramel wrote: Thu Mar 28, 2024 6:07 am

The assumption is your desktop takes too long at boot to see the partition where easy.sfs is located. I think your PC is aging. Maybe after a reboot, it is faster.

O.K. but that doesn't explain why the sticks I normally use boot first time every time in both older desktops, also true if I swap them. I am pursuing another possibility. The two always reliable USB sticks were created out of Windows with Etcher, the others with EasyDD. I'm going to try going the Etcher route and see if the problem recurs. But first I have to visit the dentist! Not my favourite thing to do.

Etcher is no more recommended (https://distro.ibiblio.org/easyos/amd64 ... readme.htm)

With Dunfell, easy.sfs is in the boot partition not in the working partition so there is no possible error message "not found easys.sfs" However if the partition is not found at boot, Easy starts in ram. And I do not know if it can to access to the partition later.

You do no want to test with the init modified (viewtopic.php?p=115271#p115271).
You might want to test with ventoy
There are 3 methods in the forum to use Easy with ventoy :
The increase of size of the Easy img file (viewtopic.php?t=11022) (The simplest)
Method to increase the size using 2 sticks (viewtopic.php?p=101351)
Installation on the first partition of the ventoy stick (viewtopic.php?p=81625)

User avatar
CF-DKS
Posts: 51
Joined: Fri Apr 08, 2022 6:41 pm
Has thanked: 11 times
Been thanked: 9 times

Re: Puzzling bug booting EasyOS from USB stick (Solved, sorta.)

Post by CF-DKS »

Caramel wrote: Thu Mar 28, 2024 3:44 pm

Etcher is no more recommended (https://distro.ibiblio.org/easyos/amd64 ... readme.htm)

With Dunfell, easy.sfs is in the boot partition not in the working partition so there is no possible error message "not found easys.sfs" However if the partition is not found at boot, Easy starts in ram. And I do not know if it can to access to the partition later.

You do no want to test with the init modified (viewtopic.php?p=115271#p115271).
You might want to test with ventoy
There are 3 methods in the forum to use Easy with ventoy :
The increase of size of the Easy img file (viewtopic.php?t=11022) (The simplest)
Method to increase the size using 2 sticks (viewtopic.php?p=101351)
Installation on the first partition of the ventoy stick (viewtopic.php?p=81625)

Yes, I am aware Etcher is no longer recommended. It has always worked fine for me using Windows, but since I have Easy I had been using EasyDD. I may try your suggestions to see if that makes a difference, but I will have to read up on it. It's been a long time since I ventured into altering code or doing anything along that line, and never with Linux, only with DOS back in the day. What drew me to Puppy and later Easy was the ability to use a GUI instead of command line.

Caramel
Posts: 476
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 100 times
Been thanked: 78 times

Re: Puzzling bug booting EasyOS from USB stick (Solved, sorta.)

Post by Caramel »

CF-DKS wrote: Thu Mar 28, 2024 4:11 pm

I may try your suggestions to see if that makes a difference, but I will have to read up on it. It's been a long time since I ventured into altering code or doing anything along that line, and never with Linux, only with DOS back in the day. What drew me to Puppy and later Easy was the ability to use a GUI instead of command line.

To test with EasyOS 5.7 with the init mofified, it's easy.
In a working Easy 5.7, in /mnt/wkg you rename intrd (to initrd-save for example) and you copy the initrd i have shared : https://www.swisstransfer.com/d/52437ca ... cd7b8d31fd.
You just have to reboot. If it is not better, you can delete the new initrd and rename the old initrd in initrd.

Something to add: in your first screenshot, there is a line of dots under the sentence "Finding Drives". Each dot corresponds to 1 second of search. The length of the line indicates the duration of the search.

User avatar
CF-DKS
Posts: 51
Joined: Fri Apr 08, 2022 6:41 pm
Has thanked: 11 times
Been thanked: 9 times

Re: Puzzling bug booting EasyOS from USB stick (Solved, sorta.)

Post by CF-DKS »

Caramel wrote: Thu Mar 28, 2024 4:32 pm

To test with EasyOS 5.7 with the init mofified, it's easy.
In a working Easy 5.7, in /mnt/wkg you rename intrd (to initrd-save for example) and you copy the initrd i have shared : https://www.swisstransfer.com/d/52437ca ... cd7b8d31fd.
You just have to reboot. If it is not better, you can delete the new initrd and rename the old initrd in initrd.

Thanks. Will try that when I get a minute. Busy weekend ahead.

Post Reply

Return to “EasyOS”