What is Grub4Dos error 13 and how can I fix it? [Solved]

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
Kjellinux
Posts: 151
Joined: Fri Jun 18, 2021 1:36 am
Has thanked: 1 time
Been thanked: 3 times

What is Grub4Dos error 13 and how can I fix it? [Solved]

Post by Kjellinux »

I have created numerous pristine installations of several different 32bit Puppy versions using exactly the same method.

1. Use GParted to create a USB with a partition table (dos), a main partition (ext3) and a swap partition.
2. Download the .iso file and copy all its files to the main partition.
3. Run Grub4Dos on the USB.

Suddenly this method stopped working and I keep getting "Error 13: invalid or unsupported executable format" after I press return in the boot menue. I have tried using GParted and Grub4Dos on different versions of Puppy, but it makes no difference.

What has gone wrong, and how can I fix it?

Last edited by Kjellinux on Tue Aug 03, 2021 1:03 pm, edited 1 time in total.
User avatar
bigpup
Moderator
Posts: 7002
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 913 times
Been thanked: 1531 times

Re: What is error 13, how can I fix it?

Post by bigpup »

To eliminate, maybe a USB going bad.
Tried this on a different USB?

In Gparted.
showing the contents of the USB.
Are there any error icon tags on any of the partitions?
Right click on the ext3 formatted partition.
Select check.
See if that finds any problems.
Ext3 partition is flagged boot?

What specific Puppy version did you copy to the USB or is giving this error?
Let's troubleshoot one specific version of Puppy.

Is there more than one Puppy version on the USB?
If several Puppies.
Are each one in it's own directory?

What specific version of Grub4dos Bootloader Config are you using?

Copy and post the contents of the menu.lst file on the USB.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
peebee
Posts: 1637
Joined: Mon Jul 13, 2020 10:54 am
Location: Worcestershire, UK
Has thanked: 157 times
Been thanked: 715 times
Contact:

Re: What is error 13, how can I fix it?

Post by peebee »

Builder of LxPups, SPups, UPup32s, VoidPups; LXDE, LXQt, Xfce addons; Chromium, Firefox etc. sfs; & Kernels

User avatar
fredx181
Posts: 3089
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 376 times
Been thanked: 1316 times
Contact:

Re: What is error 13, how can I fix it?

Post by fredx181 »

Could be the cause if on ext4, but the OP said it's on ext3

Kjellinux wrote:

1. Use GParted to create a USB with a partition table (dos), a main partition (ext3) and a swap partition

Kjellinux
Posts: 151
Joined: Fri Jun 18, 2021 1:36 am
Has thanked: 1 time
Been thanked: 3 times

Re: What is error 13, how can I fix it?

Post by Kjellinux »

@bigpup

bigpup wrote: Sat Jul 31, 2021 4:58 pm

To eliminate, maybe a USB going bad.
Tried this on a different USB?

Yes, two diferent ones, both purchased less than one month ago.

bigpup wrote: Sat Jul 31, 2021 4:58 pm

In Gparted.
showing the contents of the USB.
Are there any error icon tags on any of the partitions?

None that I can see.

bigpup wrote: Sat Jul 31, 2021 4:58 pm

Right click on the ext3 formatted partition.
Select check.
See if that finds any problems.

No indications of problems.

bigpup wrote: Sat Jul 31, 2021 4:58 pm

Ext3 partition is flagged boot?

I tried with boot flag both set and cleared.

bigpup wrote: Sat Jul 31, 2021 4:58 pm

What specific Puppy version did you copy to the USB or is giving this error?

FocalPup32 and Tahrpup 6.0.5.

bigpup wrote: Sat Jul 31, 2021 4:58 pm

Is there more than one Puppy version on the USB?
If several Puppies.
Are each one in it's own directory?

Only one Puppy at the time.

I have another USB that still works, with several Puppys, each one in it's own directory.

bigpup wrote: Sat Jul 31, 2021 4:58 pm

What specific version of Grub4dos Bootloader Config are you using?

Grub4Dos 1.9.2 on Slacko Puppy 6.3.2 and Grub4Dos v.1.9.3 on FocalPup32.

bigpup wrote: Sat Jul 31, 2021 4:58 pm

Copy and post the contents of the menu.lst file on the USB.

# menu.lst produced by grub4dosconfig-v1.9.2
color blue/cyan yellow/blue white/black cyan/black
#splashimage=/splash.xpm
timeout 10
default 0

# Frugal installed Puppy

title Puppy tahr 6.0.5 (sdc1)
find --set-root --ignore-floppies --ignore-cd /puppy_tahr_6.0.5.sfs
kernel /vmlinuz pmedia=usbflash pfix=fsck
initrd /initrd.gz

# Windows
# this entry searches Windows on the HDD and boot it up
title Windows\nBoot up Windows if installed
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
errorcheck off
find --set-root --ignore-floppies --ignore-cd /bootmgr
chainloader /bootmgr
find --set-root --ignore-floppies --ignore-cd /ntldr
chainloader /ntldr
find --set-root --ignore-floppies --ignore-cd /io.sys
chainloader /io.sys
errorcheck on

# Advanced Menu
title Advanced menu
configfile /menu-advanced.lst
commandline

Feek
Posts: 398
Joined: Sun Oct 18, 2020 8:48 am
Location: cze
Has thanked: 54 times
Been thanked: 90 times

Re: What is error 13, how can I fix it?

Post by Feek »

Do you boot only with one usb stick plugged-in? (I'm asking, because in your menu.lst is "sdc1")

Kjellinux
Posts: 151
Joined: Fri Jun 18, 2021 1:36 am
Has thanked: 1 time
Been thanked: 3 times

Re: What is error 13, how can I fix it?

Post by Kjellinux »

@Feek

Feek wrote: Sat Jul 31, 2021 7:44 pm

Do you boot only with one usb stick plugged-in? (I'm asking, because in your menu.lst is "sdc1")

Yes, when I boot there's only one USB, and it is assigned as sdb1. Sdc1 is the USB I'm formatting with GParted on the Puppy on sdb1.

Feek
Posts: 398
Joined: Sun Oct 18, 2020 8:48 am
Location: cze
Has thanked: 54 times
Been thanked: 90 times

Re: What is error 13, how can I fix it?

Post by Feek »

just a few thoughts:

did the checksum of the .iso file match after downloading?

were all the files copied to the usb stick completely? I have one slower usb2 stick with a led light which shows me, that the copying of large files may take relatively long time.

User avatar
bigpup
Moderator
Posts: 7002
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 913 times
Been thanked: 1531 times

Re: What is Grub4Dos error 13 and how can I fix it?

Post by bigpup »

Grub4Dos v.1.9.3 is the one you need to use.

It now uses UUID identifier to identify the drive and partition.

Notice the difference in what is in the menu.lst entry, from that shown in your Grub4Dos v.1.9.2 menu.lst
Example of my install using Grub4Dos v.1.9.3

title Puppy tahr 6.0.5 (sdb6/tahr605_PAE)
find --set-root uuid () 6b517a5d-03c6-4635-96c5-659b29518c84
kernel /tahr605_PAE/vmlinuz pdrv=6b517a5d-03c6-4635-96c5-659b29518c84 psubdir=/tahr605_PAE pmedia=atahd pfix=fsck
initrd /tahr605_PAE/initrd.gz

There is actually a newer version of Grub4dos. V1.9.4
http://shinobar.server-on.net/puppy/opt ... v1.9.4.pet

Here is the topic about Grub4dos
https://oldforum.puppylinux.com/viewtopic.php?t=51697

Gparted has changed and improved.
Not sure which version you used.
But maybe a newer version is needed than the one in Tahrpup or whatever version you ran it in.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
bigpup
Moderator
Posts: 7002
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 913 times
Been thanked: 1531 times

Re: What is Grub4Dos error 13 and how can I fix it?

Post by bigpup »

title Puppy tahr 6.0.5 (sdc1)
find --set-root --ignore-floppies --ignore-cd /puppy_tahr_6.0.5.sfs
kernel /vmlinuz pmedia=usbflash pfix=fsck
initrd /initrd.gz

This menu.lst entry is more of a live install not a frugal install.

Try putting all the Tahrpup files in a directory named tahrpup605

then run Grub4dos Config and install grub4dos boot loader to the USB.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

Kjellinux
Posts: 151
Joined: Fri Jun 18, 2021 1:36 am
Has thanked: 1 time
Been thanked: 3 times

Re: What is Grub4Dos error 13 and how can I fix it?

Post by Kjellinux »

@bigpup

I have tried to retrace my steps in creating the different USBs. In doing so, I may be onto what causes the problem.

The very first USBs were created the most basic way. Download the .iso file and "burn" it to the USB using some kind of utility. This worked well in most cases.

The next set of USBs were created using GParted to create a main partition and a swap partition. The entire content of the .iso file was then copied from the USBs created in the first step to the main partition of the new USBs. Until this point, there was only one Puppy per USB and no dedicated directory on the main partition. The files were copied directly to the main partition.

In the third step, I created another USB just like in the second step with the intention to try out several more Puppies using a common USB. This time I created a directory for each of the Puppies I wanted to try out. I downloaded the .iso files one by one, dragged them to the folder, clicked the .iso file to access the content, copied the content from the window that appeared and removed the .iso file. When all the Puppies were installed, I ran Grub4Dos. This was all done using Slacko Puppy 6.3.2. At least, this is how I remember it.

Now when I do the same way, I get "Error 13". Since I can get things to work if I use the downloaded .iso files from the first step, I suspect that the reason I get "Error 13" has something to do with how I access and copy the files. If I'm right, I don't really understand how it worked the first time.

This gives rise to a number of questions:

What is the correct way to copy the files into the main partition of the USB, once the .iso file is downloaded?

Is there a difference if the files are copied directly to the main partition or a dedicated folder?

If there's only one Puppy, what function does a dedicated folder have?

What's the difference between frugal and live install?

User avatar
bigpup
Moderator
Posts: 7002
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 913 times
Been thanked: 1531 times

Re: What is Grub4Dos error 13 and how can I fix it?

Post by bigpup »

What is the correct way to copy the files into the main partition of the USB, once the .iso file is downloaded?

The first way you did it.
The installer programs designed to do USB installs, make sure the USB is setup to boot, using the boot loaders files, that are in the Puppy iso.
This is a live install to a USB.

A frugal install is placing all the Puppy iso files in a named directory on the USB.
No Puppy files are just on the USB. They are all in specific directories for each Puppy version.
Then installing a boot loader on the USB to boot it.
You are trying to use Grub4dos boot loader.

Too old a version of Grub4dos, will have problems, because the newer versions have fixed bugs in Grub4dos.

One issue is what directory names Grub4dos Config looks for, to make a boot menu entry.
Best if you use the name of the Puppy version, to name the directory, you put the files in, for a frugal install.

I stopped using Grub4dos and now use Frugalpup Installer to do everything.
viewtopic.php?f=105&t=337

I do multiple installs on a USB this way:
viewtopic.php?p=1887#p1887

To put more frugal installs on the same USB stick.
Do the complete Frugalpup Installer process again, for the new Puppy version.
When you run the boot loader install.
It will make entries, for all installs it finds, on the USB drive.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
mikewalsh
Moderator
Posts: 6164
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 796 times
Been thanked: 1985 times

Re: What is Grub4Dos error 13 and how can I fix it?

Post by mikewalsh »

@Kjellinux :-

You'd copy them the exact same way as you would any other files.....as below:-

Image

(Mind you, what you see above is part of the way I always add Puppies. Create a directory, copy the contents of the ISO across, then edit the 'menu.lst' file to add another boot entry. Commonly known as a 'quick'n'dirty' install. I'm sure I annoy certain individuals on here simply because I don't use the 'official' installers, into which they put a lot of work. Fact of the matter is, for the first couple of years I did.....after which I rapidly discovered the 'quick'n'dirty' method takes a fraction of the time once you have enough Puppy experience to know what you're doing.

From the moment I've downloaded an ISO, I can have a new Puppy booting on here less than 3 minutes later; I could nearly do it in my sleep, I've done it so many times. .!)

---------------------------------------

If you only intend to have one single Puppy on the stick, a dedicated directory isn't necessary. However, it makes absolutely no difference at all whether files are copied to a dedicated directory OR to the partition itself.....they are treated no differently.

The only reason for dedicated directories with an initial, single Puppy is if you intend to add more Puppies to the stick at a later date. It simply makes things easier for you, the user.

---------------------------

Frugal & live installs work pretty much the same in Puppyland. Both load Puppy into RAM, where able to do so, then give you the option to save your session at the end should you wish to do so. A frugal is usually installed to a 'permanent' home - an HDD partition, or a USB flash drive; the save is usually located in the same place as the Puppy install, though it doesn't have to be.

Generally speaking, it's only called a 'Live' install when used purely for testing purposes. However, as stated above, in Puppyland a traditional Linux 'Live' install works almost identically to the way a Puppy 'frugal' does.

There are even utilities which allow you to boot direct from an ISO file, if you want to.

Mike. ;)

Kjellinux
Posts: 151
Joined: Fri Jun 18, 2021 1:36 am
Has thanked: 1 time
Been thanked: 3 times

Re: What is Grub4Dos error 13 and how can I fix it?

Post by Kjellinux »

@bigpup @mikewalsh

mikewalsh wrote: Sun Aug 01, 2021 11:06 pm

You'd copy them the exact same way as you would any other files.....as below:-

I think I may have figured out what causes the problem, but I'm not sure I understand why. Looking at Mike's illustration I noticed that the .iso file that he klicked to open was located in a dedicated directory. I dragged the downloaded .iso file directly from the Firefox download library to the main partition. Here I klicked the .iso file to open it. It opened into a new window. From this window i copied all the files to the main partition. This method caused "Error 13".

When instead I located the .iso file in ~/spot/Downloads, klicked on it to open it and then copied all the files to the main partition, "Error 13" was gone with the wind.

mikewalsh wrote: Sun Aug 01, 2021 11:06 pm

Create a directory, copy the contents of the ISO across, then edit the 'menu.lst' file to add another boot entry. Commonly known as a 'quick'n'dirty' install.

I opted for using Grub4Dos instead of manually editing menu.lst.

bigpup wrote: Sun Aug 01, 2021 11:00 pm

The installer programs designed to do USB installs, make sure the USB is setup to boot, using the boot loaders files, that are in the Puppy iso.

I was under the impression that programs like Balena Etcher and Rufus cloned the .iso file to the USB. What difference, if any, is there to what happens when i open the .iso file in a folder in Puppy Linux by just klicking on it?

User avatar
bigpup
Moderator
Posts: 7002
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 913 times
Been thanked: 1531 times

Re: What is Grub4Dos error 13 and how can I fix it?

Post by bigpup »

The thing is, not all drives have the exact same abilities, to perform read/write processes.
What built in controller, the drive has, and it's abilities.
So, hard to say 100%, all drives work exactly like this.
sure, they can all read/write, but exactly how does the drive do it.

Think on this.
If you have the iso on the same partition as the one you want to install the files on.
Everything is being done on that single partition and drive at the same time.
Got to read from it, and write to it.
Can only do one thing at a time.
So the reads have to be stored in memory and when it stops having to read, then it can do writes.
Also, a ISO is not actually accessed like a directory or folder. It is mounted or unmounted.
Example:

Screenshot(1).jpg
Screenshot(1).jpg (25.18 KiB) Viewed 1800 times

.
I wonder if you released the iso and unmounted it ,when you completed copying the files from it?
That can affect being able to do a clean unmount of the USB drive, when you shutdown the computer.
Luckily, Puppy shutdown or reboot process, is suppose to handle properly unmounting all drives, before completely power off computer.
.

If the iso is in a different location, a different drive is even better.
In fact, having the read data, on one drive, and the write location, on a different drive, always works best.
You can read and write at the same time.
No conflict on drive read write process.

The programs specifically for doing USB live installs.
Also have code to run checks on the drive for proper setup.
That when complete, it did make a working live install.
Most, by default, want the drive partition format to be fat32.
Why?
Because USB drives are already that format, by the manufacture, and all computers, have no problems, with fat32 format.
Some computers, only see a drive partition formatted fat32, as a proper boot partition, if containing a boot loader, to use to boot the computer.

I have a computer this affects. (has latest UEFI firmware)
If the usb has one partition, formatted fat32, a Live Puppy install, it has no problem booting.
If the partition is formatted a ext 2, 3, or 4 format, flagged boot, and has a Live Puppy install (same Puppy files).
The drive is not seen by the computer, as a boot-able device.
But, I can make a small first partition, formatted fat32, flagged boot, with bootloader files on this partition.
A second partition (any format), with the live Puppy install or a frugal install.
This setup boots with no problem.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

Kjellinux
Posts: 151
Joined: Fri Jun 18, 2021 1:36 am
Has thanked: 1 time
Been thanked: 3 times

Re: What is Grub4Dos error 13 and how can I fix it?

Post by Kjellinux »

@bigpup @mikewalsh

bigpup wrote: Mon Aug 02, 2021 11:55 pm

Think on this.
If you have the iso on the same partition as the one you want to install the files on.
Everything is being done on that single partition and drive at the same time.
Got to read from it, and write to it.
Can only do one thing at a time.
So the reads have to be stored in memory and when it stops having to read, then it can do writes.

This could possibly be the "why". If a file in a directory is open and being read, the system would most likely not be able to write to the same file. Makes sense.

bigpup wrote: Mon Aug 02, 2021 11:55 pm

Also, a ISO is not actually accessed like a directory or folder. It is mounted or unmounted.
...
I wonder if you released the iso and unmounted it ,when you completed copying the files from it?

Most likely not, since I was not aware of this. On occasions I got error messages that said something about unmounting, but at the time I didn't understand them.

User avatar
mikewalsh
Moderator
Posts: 6164
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 796 times
Been thanked: 1985 times

Re: What is Grub4Dos error 13 and how can I fix it?

Post by mikewalsh »

@Kjellinux :-

Yeah, that all makes sense when I think about it, actually. As I've said before, I'm perhaps not the best person to be helping folks out with much of this basic stuff; I don't use many of the built-in utilities that others have put lots of work into getting functional for beginners. I do SO much stuff in a totally manual, non-standard way, because it's simply quicker & easier for me to do so....

(*shrug*)

(Puppy is considered "odd" by mainstream Linux standards. MY set-up is distinctly "odd", even by Puppy standards.....but it works for ME.)

Mike. ;)

Post Reply

Return to “Beginners Help”