Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What does this Ubuntu command mean?

72 views
Skip to first unread message

micky

unread,
Dec 30, 2021, 3:30:24 PM12/30/21
to

This post is more important than the one a few minutes ago ;-)

I tried the auto method to use Ubuntu to fix windows start-up, described
https://windowsreport.com/windows-10-bootloader-linux/ and it did not
work so now I'm on to the manual way (instead of just clicking
Boot-Repair).

It started fine but on the second command I got No such file or
directory. I looked in the file structure and found what might be the
right file. If I understood the syntax of the command, I could better
guess if I can use this slightly differently named file.

These are the instructions I followed:
Restart Ubuntu, open Terminal, and in the command line, type the
following string and press Enter after each:

sudo apt-get install syslinux
This seemed to work. Said syslinux is already the newest
version.

sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
This DID NOT WORK. Said dd: failed to open
'/usr/lib/syslinux/mbr.bin': No such file or directory.
I had changed /sda to /hda, but iiuc it didn't get that far so
that's not the problem?

What do I do now? When giving the instructions to use the Auto method,
either the author made a typo of some sort, or they had renamed it, when
he said boot-loader instead of boot-repair. Maybe that's true in this
line too?

What does usr/lib/syslinux/mbr.bin mean?

What does dd if= mean?

What does of= mean?

I found the Files icon and looked for the file it says is not there.
Found a couple with partial similarities, but then found:

computer/usr/lib/syslinux/mbr/mbr.bin Do you think that could be
what he meant? ??? Should I use that in the previous command, as
in:
sudo dd if=computer/usr/lib/syslinux/mbr/mbr.bin of=/dev/sda1

where I think sda1 is the reserved partition and sda2 is the windows
partition on the same SDD. Actually, should I be doing this to the
Reserved Partition or the one with Windows in it?


BTW. The file manager showed that my Data drive is named /dev/sdb1 and
my OS drive is named /dev/sda2. Does that mean the almost hidden
reserved windows partition is /dev/sda1? Is that what I should use if I
ever get the first part of the command right?




These were the remaining two instructions. Didn't try them.usr
sudo apt-get install mbr
sudo install-mbr -i n -p D -t 0 /dev/sda

It also lists /dev/loop0. What could that be?
It contains lost+found, upper, and work!!


BTW, I found a whole page on Toms Hardware where someone said he heard
you can use Ubuntu to repair Windows and everyone said, No you can't do
that. This has not yet worked when I'm writing this, but they'd never
even heard of it. Might have been when it just came out.


Andy Burns

unread,
Dec 30, 2021, 3:47:22 PM12/30/21
to
micky wrote:

> sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
> This DID NOT WORK. Said dd: failed to open
> '/usr/lib/syslinux/mbr.bin': No such file or directory.

Perhaps you were lucky it didn't find it, overwriting the Windows Master Boot
Record might not be what you want to do ...

First off, is there anything you care about on the hard drive?

Big Al

unread,
Dec 30, 2021, 4:37:01 PM12/30/21
to
If you don't understand the commands, you really should not be running them.
If you're clueless, get away!

Use the 'man' command (short for manual) followed by the command you are interested in. man dd will/should explain the dd command.

--
Linux Mint Cinnamon 20.2 64bit, Dell Inspiron 5570 laptop
Quad Core i7-8550U, 16G Memory, 512G SSD, 750G & 1TB HDDs

micky

unread,
Dec 30, 2021, 5:26:39 PM12/30/21
to
In alt.comp.os.windows-10, on Thu, 30 Dec 2021 20:47:18 +0000, Andy
Burns <use...@andyburns.uk> wrote:

>micky wrote:
>
>> sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
>> This DID NOT WORK. Said dd: failed to open
>> '/usr/lib/syslinux/mbr.bin': No such file or directory.
>
>Perhaps you were lucky it didn't find it, overwriting the Windows Master Boot
>Record might not be what you want to do ...

But it might be what I want to do. If the choice is to wipe the
harddrive and start from there, don't you think it's better to try this.

So what does the if= mean, and what does the of= mean

>First off, is there anything you care about on the hard drive?

Yes, some, and I've copied it off already.

Andy Burns

unread,
Dec 30, 2021, 5:31:00 PM12/30/21
to
micky wrote:

> So what does the if= mean, and what does the of= mean

input file and output file respectively, but as Big Al says, do you really want
to be running commands when you don't know what they're doing? Linux won't ask
"are you sure?"

Paul

unread,
Dec 30, 2021, 5:57:35 PM12/30/21
to
On 12/30/2021 3:30 PM, micky wrote:
> sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda

This command needs a length field.

The length field will likely be implied by the file
"mbr.bin" being less than 512 bytes.

You do not want to overwrite the partition table at
the end of the MBR.

The only time you can copy the whole MBR, is when you
are restoring after some damage event, and you know for
a fact the partitions have not changed, so that copying
back the entire 512 byte MBR does no harm.

But if you're in a stranger environment where partitions
are not under your control/purview, then around 440 bytes
or so is the right number. You can see an example of the
Syslinux materials, here.

[Picture]

https://i.postimg.cc/L5fWVkh9/bytes-440.gif

Paul

Carlos E.R.

unread,
Dec 30, 2021, 6:28:07 PM12/30/21
to
On 30/12/2021 23.57, Paul wrote:
> On 12/30/2021 3:30 PM, micky wrote:
>>      sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
>
> This command needs a length field.

Not this time.

>
> The length field will likely be implied by the file
> "mbr.bin" being less than 512 bytes.
>
> You do not want to overwrite the partition table at
> the end of the MBR.
>
> The only time you can copy the whole MBR, is when you
> are restoring after some damage event, and you know for
> a fact the partitions have not changed, so that copying
> back the entire 512 byte MBR does no harm.
>
> But if you're in a stranger environment where partitions
> are not under your control/purview, then around 440 bytes
> or so is the right number. You can see an example of the
> Syslinux materials, here.

That file is exactly 440 bytes long.

cer@Telcontar:~> l /usr/share/syslinux/mbr.bin
-rw-r--r-- 1 root root 440 Oct 12 20:13 /usr/share/syslinux/mbr.bin
cer@Telcontar:~>


>
>    [Picture]
>
>    https://i.postimg.cc/L5fWVkh9/bytes-440.gif
>
>   Paul


--
Cheers, Carlos.

Carlos E.R.

unread,
Dec 30, 2021, 6:40:07 PM12/30/21
to
On 30/12/2021 21.30, micky wrote:
>
> This post is more important than the one a few minutes ago ;-)
>
> I tried the auto method to use Ubuntu to fix windows start-up, described
> https://windowsreport.com/windows-10-bootloader-linux/ and it did not
> work so now I'm on to the manual way (instead of just clicking
> Boot-Repair).
>
> It started fine but on the second command I got No such file or
> directory. I looked in the file structure and found what might be the
> right file. If I understood the syntax of the command, I could better
> guess if I can use this slightly differently named file.
>
> These are the instructions I followed:
> Restart Ubuntu, open Terminal, and in the command line, type the
> following string and press Enter after each:
>
> sudo apt-get install syslinux
> This seemed to work. Said syslinux is already the newest
> version.
>
> sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
> This DID NOT WORK. Said dd: failed to open
> '/usr/lib/syslinux/mbr.bin': No such file or directory.
> I had changed /sda to /hda, but iiuc it didn't get that far so
> that's not the problem?

Don't change the command at random, that command can destroy disks if
not used properly. And it will not warn you.

>
> What do I do now? When giving the instructions to use the Auto method,
> either the author made a typo of some sort, or they had renamed it, when
> he said boot-loader instead of boot-repair. Maybe that's true in this
> line too?
>
> What does usr/lib/syslinux/mbr.bin mean?

/usr/lib/syslinux/mbr.bin is a file. In this case, it is the generic
code that is usually installed on the MBR of a hard disk, the version
created by the syslinux people.

>
> What does dd if= mean?

dd is the command, and it stands for "convert and copy a file".

if= means "the input file is equal to"

>
> What does of= mean?

of= means "the output file is equal to"


>
> I found the Files icon and looked for the file it says is not there.
> Found a couple with partial similarities, but then found:
>
> computer/usr/lib/syslinux/mbr/mbr.bin Do you think that could be
> what he meant? ??? Should I use that in the previous command, as
> in:
> sudo dd if=computer/usr/lib/syslinux/mbr/mbr.bin of=/dev/sda1

That method will probably destroy your "disk".

>
> where I think sda1 is the reserved partition and sda2 is the windows
> partition on the same SDD. Actually, should I be doing this to the
> Reserved Partition or the one with Windows in it?

No, it has to be done on "sda", not "sda1" nor "sda2".

It is very dangerous to touch things you don't understand. The 'dd'
command can actually destroy your disk in a second if used incorrectly.


The correct command, in _my_ computer, would be

sudo dd if=/usr/share/syslinux/mbr.bin of=/dev/sda

In your computer it is probably

sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda


If it failed, you probably typed it wrong.

do

ls /usr/lib/syslinux/
ls /usr/lib/
ls /usr/
ls /

and paste here the result.




> These were the remaining two instructions. Didn't try them.usr
> sudo apt-get install mbr
> sudo install-mbr -i n -p D -t 0 /dev/sda
>
> It also lists /dev/loop0. What could that be?
> It contains lost+found, upper, and work!!

Dunno.

>
>
> BTW, I found a whole page on Toms Hardware where someone said he heard
> you can use Ubuntu to repair Windows and everyone said, No you can't do
> that. This has not yet worked when I'm writing this, but they'd never
> even heard of it. Might have been when it just came out.

It can be done, but you need to know what you are doing.


--
Cheers, Carlos.

Ken Blake

unread,
Dec 30, 2021, 6:47:43 PM12/30/21
to
On 12/30/2021 3:26 PM, micky wrote:
> In alt.comp.os.windows-10, on Thu, 30 Dec 2021 20:47:18 +0000, Andy
> Burns <use...@andyburns.uk> wrote:
>
>>micky wrote:
>>
>>> sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
>>> This DID NOT WORK. Said dd: failed to open
>>> '/usr/lib/syslinux/mbr.bin': No such file or directory.
>>
>>Perhaps you were lucky it didn't find it, overwriting the Windows Master Boot
>>Record might not be what you want to do ...
>
> But it might be what I want to do. If the choice is to wipe the
> harddrive and start from there, don't you think it's better to try this.


I missed the beginning of the thread. Do you want to wipe the drive and
clean install Windows?

If that's what you want, there's no need a do anything but a clean
installation. It will begin by formatting the drive.

micky

unread,
Dec 30, 2021, 9:50:15 PM12/30/21
to
In alt.comp.os.windows-10, on Thu, 30 Dec 2021 16:47:44 -0700, Ken Blake
<K...@invalidinvalid.com> wrote:

>On 12/30/2021 3:26 PM, micky wrote:
>> In alt.comp.os.windows-10, on Thu, 30 Dec 2021 20:47:18 +0000, Andy
>> Burns <use...@andyburns.uk> wrote:
>>
>>>micky wrote:
>>>
>>>> sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
>>>> This DID NOT WORK. Said dd: failed to open
>>>> '/usr/lib/syslinux/mbr.bin': No such file or directory.
>>>
>>>Perhaps you were lucky it didn't find it, overwriting the Windows Master Boot
>>>Record might not be what you want to do ...
>>
>> But it might be what I want to do. If the choice is to wipe the
>> harddrive and start from there, don't you think it's better to try this.
>
>
>I missed the beginning of the thread. Do you want to wipe the drive and
>clean install Windows?

No, that's what I want to avoid. I should have said "don't you think
it's better to try this" INSTEAD, or first.
>
>If that's what you want, there's no need a do anything but a clean
>installation. It will begin by formatting the drive.

Thanks.

J.O. Aho

unread,
Dec 31, 2021, 5:52:52 AM12/31/21
to
On 31/12/2021 00.37, Carlos E.R. wrote:
> On 30/12/2021 21.30, micky wrote:

>>
>>      computer/usr/lib/syslinux/mbr/mbr.bin  Do you think that could be
>> what he meant?     ???   Should I use that in the previous command, as
>> in:
>>     sudo dd if=computer/usr/lib/syslinux/mbr/mbr.bin of=/dev/sda1
>
> That method will probably destroy your "disk".

No, he will just destroy the first partition, the second partition will
still be accessible, but he will have no way of restoring the first
partition.


>> where I think sda1 is the reserved partition and sda2 is the windows
>> partition on the same SDD.   Actually, should I be doing this to the
>> Reserved Partition or the one with Windows in it?
>
> No, it has to be done on "sda", not "sda1" nor "sda2".
>
> It is very dangerous to touch things you don't understand. The 'dd'
> command can actually destroy your disk in a second if used incorrectly.
>
>
> The correct command, in _my_ computer, would be
>
>   sudo dd if=/usr/share/syslinux/mbr.bin of=/dev/sda
>
> In your computer it is probably
>
>   sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
>
>
> If it failed, you probably typed it wrong.
> ls /usr/lib/syslinux/

In OP case it's in a subdirectory called mbr according to other thread
he posted on, so the correct path would be /usr/lib/syslinux/mbr/mbr.bin

As the file wasn't located in the same place as in the instruction he
was following, hee hasn't managed to mess up his hard drive yet. Also we
don't know if he uses mbr or gpt (think this is the default in ms-win-10
install), so he may not get the result he is expecting even if he doe
things the "right way".


--

//Aho

Carlos E.R.

unread,
Dec 31, 2021, 7:32:07 AM12/31/21
to
On 31/12/2021 11.52, J.O. Aho wrote:
> On 31/12/2021 00.37, Carlos E.R. wrote:
>> On 30/12/2021 21.30, micky wrote:
>
>>>
>>>      computer/usr/lib/syslinux/mbr/mbr.bin  Do you think that could be
>>> what he meant?     ???   Should I use that in the previous command, as
>>> in:
>>>     sudo dd if=computer/usr/lib/syslinux/mbr/mbr.bin of=/dev/sda1
>>
>> That method will probably destroy your "disk".
>
> No, he will just destroy the first partition, the second partition will
> still be accessible, but he will have no way of restoring the first
> partition.

In Windows parlance, a partition is a "disk", it gets a disk letter ;-)

That's why I used quotes.

Oh, if instead of sda1 he writes sda5, a logical partition, then the
entire logical partition chain is lost. Similarly if done on the
extended partition.


>>> where I think sda1 is the reserved partition and sda2 is the windows
>>> partition on the same SDD.   Actually, should I be doing this to the
>>> Reserved Partition or the one with Windows in it?
>>
>> No, it has to be done on "sda", not "sda1" nor "sda2".
>>
>> It is very dangerous to touch things you don't understand. The 'dd'
>> command can actually destroy your disk in a second if used incorrectly.
>>
>>
>> The correct command, in _my_ computer, would be
>>
>>    sudo dd if=/usr/share/syslinux/mbr.bin of=/dev/sda
>>
>> In your computer it is probably
>>
>>    sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
>>
>>
>> If it failed, you probably typed it wrong.
>> ls /usr/lib/syslinux/
>
> In OP case it's in a subdirectory called mbr according to other thread
> he posted on, so the correct path would be /usr/lib/syslinux/mbr/mbr.bin
>
> As the file wasn't located in the same place as in the instruction he
> was following, hee hasn't managed to mess up his hard drive yet. Also we
> don't know if he uses mbr or gpt (think this is the default in ms-win-10
> install), so he may not get the result he is expecting even if he doe
> things the "right way".

Oh, right. I assumed he knew his disk was MBR type.

--
Cheers, Carlos.

Ken Blake

unread,
Dec 31, 2021, 10:41:34 AM12/31/21
to
On 12/31/2021 5:28 AM, Carlos E.R. wrote:
> On 31/12/2021 11.52, J.O. Aho wrote:
>> On 31/12/2021 00.37, Carlos E.R. wrote:
>>> On 30/12/2021 21.30, micky wrote:
>>
>>>>
>>>>      computer/usr/lib/syslinux/mbr/mbr.bin  Do you think that could be
>>>> what he meant?     ???   Should I use that in the previous command, as
>>>> in:
>>>>     sudo dd if=computer/usr/lib/syslinux/mbr/mbr.bin of=/dev/sda1
>>>
>>> That method will probably destroy your "disk".
>>
>> No, he will just destroy the first partition, the second partition will
>> still be accessible, but he will have no way of restoring the first
>> partition.
>
> In Windows parlance, a partition is a "disk", it gets a disk letter ;-)


The problem is that word "disk" is often used two different ways.
Sometimes it means the physical device, and sometimes it means a
partition. So, as far as I'm concerned, J.O. Aho's reply was potentially
useful to anyone who wasn't sure which meaning of "disk" was meant.

Ken Blake

unread,
Dec 31, 2021, 10:42:32 AM12/31/21
to
On 12/30/2021 7:50 PM, micky wrote:
> In alt.comp.os.windows-10, on Thu, 30 Dec 2021 16:47:44 -0700, Ken Blake
> <K...@invalidinvalid.com> wrote:
>
>>On 12/30/2021 3:26 PM, micky wrote:
>>> In alt.comp.os.windows-10, on Thu, 30 Dec 2021 20:47:18 +0000, Andy
>>> Burns <use...@andyburns.uk> wrote:
>>>
>>>>micky wrote:
>>>>
>>>>> sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
>>>>> This DID NOT WORK. Said dd: failed to open
>>>>> '/usr/lib/syslinux/mbr.bin': No such file or directory.
>>>>
>>>>Perhaps you were lucky it didn't find it, overwriting the Windows Master Boot
>>>>Record might not be what you want to do ...
>>>
>>> But it might be what I want to do. If the choice is to wipe the
>>> harddrive and start from there, don't you think it's better to try this.
>>
>>
>>I missed the beginning of the thread. Do you want to wipe the drive and
>>clean install Windows?
>
> No, that's what I want to avoid. I should have said "don't you think
> it's better to try this" INSTEAD, or first.


OK, sorry to have misunderstood you.

david c

unread,
Dec 31, 2021, 11:42:04 AM12/31/21
to
My sentiments exactly, and have been for a long time. On my Linux Mint
System, the file in question is just called mbr, not mbr.bin.
On my 2010 laptop, win7 was installed when purchased and has never needed
to be 'fixed'. The machine is now dual boot with Linux Mint.
I have a macrium restore image, the best way to restore to a known
working system.
>

micky

unread,
Dec 31, 2021, 12:43:18 PM12/31/21
to
In alt.comp.os.windows-10, on Thu, 30 Dec 2021 22:30:58 +0000, Andy
I know, but I never served in the army, or fought wild bears. This is
the most excitement I have. Plus it's already not working.

micky

unread,
Dec 31, 2021, 1:13:18 PM12/31/21
to
In alt.comp.os.windows-10, on Fri, 31 Dec 2021 00:37:40 +0100, "Carlos
E.R." <robin_...@es.invalid> wrote:

>On 30/12/2021 21.30, micky wrote:
>>
>> This post is more important than the one a few minutes ago ;-)
>>
>> I tried the auto method to use Ubuntu to fix windows start-up, described
>> https://windowsreport.com/windows-10-bootloader-linux/ and it did not
>> work so now I'm on to the manual way (instead of just clicking
>> Boot-Repair).
>>
>> It started fine but on the second command I got No such file or
>> directory. I looked in the file structure and found what might be the
>> right file. If I understood the syntax of the command, I could better
>> guess if I can use this slightly differently named file.
>>
>> These are the instructions I followed:
>> Restart Ubuntu, open Terminal, and in the command line, type the
>> following string and press Enter after each:
>>
>> sudo apt-get install syslinux
>> This seemed to work. Said syslinux is already the newest
>> version.
>>
>> sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
>> This DID NOT WORK. Said dd: failed to open
>> '/usr/lib/syslinux/mbr.bin': No such file or directory.
>> I had changed /sda to /hda, but iiuc it didn't get that far so
>> that's not the problem?
>
>Don't change the command at random, that command can destroy disks if
>not used properly. And it will not warn you.

It wasn't exactly at random. I found a webpage that explained what the
instruction meant and it said /sda was the first SCSI disk, and /hda was
the first hard disk. But I don't think anyone here is using SCSI and
yet no one objected to sda.
>
>>
>> What do I do now? When giving the instructions to use the Auto method,
>> either the author made a typo of some sort, or they had renamed it, when
>> he said boot-loader instead of boot-repair. Maybe that's true in this
>> line too?
>>
>> What does usr/lib/syslinux/mbr.bin mean?
>
>/usr/lib/syslinux/mbr.bin is a file. In this case, it is the generic
>code that is usually installed on the MBR of a hard disk, the version
>created by the syslinux people.
>
>>
>> What does dd if= mean?
>
>dd is the command, and it stands for "convert and copy a file".
>
>if= means "the input file is equal to"
>
>>
>> What does of= mean?
>
>of= means "the output file is equal to"

This helps.
>
>>
>> I found the Files icon and looked for the file it says is not there.
>> Found a couple with partial similarities, but then found:
>>
>> computer/usr/lib/syslinux/mbr/mbr.bin Do you think that could be
>> what he meant? ??? Should I use that in the previous command, as
>> in:
>> sudo dd if=computer/usr/lib/syslinux/mbr/mbr.bin of=/dev/sda1
>
>That method will probably destroy your "disk".

Sounds bad.

>>
>> where I think sda1 is the reserved partition and sda2 is the windows
>> partition on the same SDD. Actually, should I be doing this to the
>> Reserved Partition or the one with Windows in it?
>
>No, it has to be done on "sda", not "sda1" nor "sda2".

I get it now. He had said "Don’t forget to replace sda with the
Windows 10 system drive." but he just means it might be sdb.
>
>It is very dangerous to touch things you don't understand. The 'dd'
>command can actually destroy your disk in a second if used incorrectly.
>
>
>The correct command, in _my_ computer, would be
>
> sudo dd if=/usr/share/syslinux/mbr.bin of=/dev/sda
>
>In your computer it is probably
>
> sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
>
>
>If it failed, you probably typed it wrong.
>
>do
>
>ls /usr/lib/syslinux/
>ls /usr/lib/
>ls /usr/
>ls /
>
>and paste here the result.

I plan to do that.
>
>
>
>> These were the remaining two instructions. Didn't try them.usr
>> sudo apt-get install mbr
>> sudo install-mbr -i n -p D -t 0 /dev/sda

Maybe a bigger problem in all this is that he only gives instructions on
replacing the mbr. AFAIK I've already done that more than once, using
the Win10 installation usb, Hirens, Lazesoft. The problem is that the
third or fourth instruction in the list doesn't work (or sometimes the
software doesn't say what doesn't work, or it thinks it all worked but
it didn't.)

>> It also lists /dev/loop0. What could that be?
>> It contains lost+found, upper, and work!!
>
>Dunno.
>
>>
>>
>> BTW, I found a whole page on Toms Hardware where someone said he heard
>> you can use Ubuntu to repair Windows and everyone said, No you can't do
>> that. This has not yet worked when I'm writing this, but they'd never
>> even heard of it. Might have been when it just came out.
>
>It can be done, but you need to know what you are doing.

I've found that things can always get worse, but at the moment I don't
think I can make this worse.

Worst comes to worst, I wipe it and start from scratch, or bearing in
mind that I managed to ruin a $2 flashdrive, even while following
Macrium's directions, maybe I can ruin this entire SSD. I don't like
spending money but even that I can afford to replace if I have too.

When I bought this refurbished PC, and it had an SDD, I thought it wwas
a new drive because I didn't think they sold PC's with SDDs then, but
since then I'm pretty sure they did and my SDD was used, who knows how
much. It also has an HDD and I'm sure that was original too.

But if I didn't have problems, I woudln't have problems to solve. i
love solving mechanical and computer problems, even if I fail sometimes.

micky

unread,
Dec 31, 2021, 1:22:50 PM12/31/21
to
In alt.comp.os.windows-10, on Fri, 31 Dec 2021 11:52:49 +0100, "J.O.
Aho" <us...@example.net> wrote:

>On 31/12/2021 00.37, Carlos E.R. wrote:
>> On 30/12/2021 21.30, micky wrote:
>
>>>
>>>      computer/usr/lib/syslinux/mbr/mbr.bin  Do you think that could be
>>> what he meant?     ???   Should I use that in the previous command, as
>>> in:
>>>     sudo dd if=computer/usr/lib/syslinux/mbr/mbr.bin of=/dev/sda1
>>
>> That method will probably destroy your "disk".
>
>No, he will just destroy the first partition, the second partition will
>still be accessible, but he will have no way of restoring the first
>partition.

But maybe I'll still be able to reformat it??
>......
>
>In OP case it's in a subdirectory called mbr according to other thread
>he posted on, so the correct path would be /usr/lib/syslinux/mbr/mbr.bin
>
>As the file wasn't located in the same place as in the instruction he
>was following, hee hasn't managed to mess up his hard drive yet. Also we
>don't know if he uses mbr or gpt (think this is the default in ms-win-10
>install),

I can't find the first time you brought that up, but it's mbr. The
bios has accomodation for both, but still they are using mbr, I don't
know why. (Maybe the bios got upgraded, but the
whatever-you-call-mbr-vs-gpt didn't?)

micky

unread,
Dec 31, 2021, 1:22:52 PM12/31/21
to
In alt.comp.os.windows-10, on Fri, 31 Dec 2021 16:42:02 -0000 (UTC),
david c <dave...@nowhere.org> wrote:

>On Thu, 30 Dec 2021 16:36:59 -0500, Big Al wrote:
>
>> On 12/30/21 3:30 PM, this is what micky wrote:
>>>
>>> This post is more important than the one a few minutes ago ;-)
>>>
>>> I tried the auto method to use Ubuntu to fix windows start-up,
>>> described https://windowsreport.com/windows-10-bootloader-linux/ and it
>>> did not work so now I'm on to the manual way (instead of just clicking
>>> Boot-Repair).
>>>
>>>
>>>
>>> .....
>>>
>> If you don't understand the commands, you really should not be running
>> them.
>> If you're clueless, get away!

I appreciate the concern you, Al, and David and others have shown, and I
was all shook up last night, but I still think I won't make it any worse
than it is and this ia prompting me to learn Linux and to learn more
about mbr's .
>
>>
>> Use the 'man' command (short for manual) followed by the command you are
>> interested in. man dd will/should explain the dd command.

Good to know.

>My sentiments exactly, and have been for a long time. On my Linux Mint

I made a copy of Linux Mint too and tried what was above, and afaict it
wasn't set up to do this stuff. Maybe it's only the Ubuntu version that
has this Repair Windows stuff in it.

>System, the file in question is just called mbr, not mbr.bin.
>On my 2010 laptop, win7 was installed when purchased and has never needed
>to be 'fixed'. The machine is now dual boot with Linux Mint.
>I have a macrium restore image, the best way to restore to a known
>working system.

But don't you lose all the changes you've made since the last image. I
have a macrium image but it's not very recent. I should have kept a
journal of little changes I made, but I didn't, and I won't remember
what they are until they annoy me again and Iwon't remember how I fixed
them.. I plan to log all this stuff from now on.


Chris Elvidge

unread,
Dec 31, 2021, 1:35:01 PM12/31/21
to
On 31/12/2021 18:13, micky wrote:

>
> It wasn't exactly at random. I found a webpage that explained what the
> instruction meant and it said /sda was the first SCSI disk, and /hda was
> the first hard disk. But I don't think anyone here is using SCSI and
> yet no one objected to sda.

That's what you get for reading out-of-date documents.
Linux kernel/udev changed from /dev/hda etc. to /dev/sda etc. a long
time ago. All hard disks are now /dev/sda etc.; s is serial. (Except
nvme drives AFAIK.)


--
Chris Elvidge
England

Jonathan N. Little

unread,
Dec 31, 2021, 1:55:00 PM12/31/21
to
david c wrote:
> My sentiments exactly, and have been for a long time. On my Linux Mint
> System, the file in question is just called mbr, not mbr.bin.

Really? Are you sure you are not looking at the DIRECTORY and not the FILE?

Ubuntu 20.04:

jonathan@nomad:~$ sudo find / -name mbr.bin 2> /dev/null
/usr/lib/syslinux-legacy/mbr.bin
/usr/lib/syslinux/mbr/mbr.bin
/usr/lib/SYSLINUX/mbr.bin
/usr/share/multibootusb/data/tools/mbr.bin

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Jonathan N. Little

unread,
Dec 31, 2021, 2:16:16 PM12/31/21
to
Aa that has been said before your REALLY should understand what a
command does BEFORE running it, especially one that writes directly to
the disk like "dd"

That said, some things that your should first do BEFORE doing anything.

1) Is the drive formatted with legacy MBR or is it GPT? If the latter
then what your are trying to do is wrong from the start. You can use the
live session Linux to investigate this in the GUI with gparted or disks
for what type of partition table your are using.

2) You need to know what device your target drive is for the dd command.
Again gparted or disks will help here. You write the MBR to the drive
not to a partition. In Linux it will be the device WITHOUT the trailing
number. /dev/sda not /dev/sda1, /dev/sda5 or /dev/sda7... Also it might
not be /dev/sda it might be /dev/sdb or something else. Just upgraded a
Ubuntu system for my mother and her system has a media reader for
various media cards so her first hard drive was /dev/sde NOT /dev/sda

3) For the dd command you need to know the full path to where the
mbr.bin is located. The command "find" can be your friend here:

sudo find / -name mbr.bin 2> /dev/null
/usr/lib/syslinux-legacy/mbr.bin
/usr/lib/syslinux/mbr/mbr.bin
/usr/lib/SYSLINUX/mbr.bin
/usr/share/multibootusb/data/tools/mbr.bin

4) Lastly, I would image the drive first BEFORE doing any of this. At
lease backup all the user files on the drive because failure could mean
losing everything. Just saying...

Carlos E.R.

unread,
Dec 31, 2021, 4:04:07 PM12/31/21
to
On 31/12/2021 16.41, Ken Blake wrote:
> On 12/31/2021 5:28 AM, Carlos E.R. wrote:
>> On 31/12/2021 11.52, J.O. Aho wrote:
>>> On 31/12/2021 00.37, Carlos E.R. wrote:
>>>> On 30/12/2021 21.30, micky wrote:
>>>
>>>>>
>>>>>      computer/usr/lib/syslinux/mbr/mbr.bin  Do you think that could be
>>>>> what he meant?     ???   Should I use that in the previous command, as
>>>>> in:
>>>>>     sudo dd if=computer/usr/lib/syslinux/mbr/mbr.bin of=/dev/sda1
>>>>
>>>> That method will probably destroy your "disk".
>>>
>>> No, he will just destroy the first partition, the second partition
>>> will still be accessible, but he will have no way of restoring the
>>> first partition.
>>
>> In Windows parlance, a partition is a "disk", it gets a disk letter ;-)
>
>
> The problem is that word "disk" is often used two different ways.
> Sometimes it means the physical device, and sometimes it means a
> partition. So, as far as I'm concerned, J.O. Aho's reply was potentially
> useful to anyone who wasn't sure which meaning of "disk" was meant.

Sure.

I am also claryifying what was my meaning ;-)


--
Cheers, Carlos.

Carlos E.R.

unread,
Dec 31, 2021, 4:04:07 PM12/31/21
to
No, this is not about the bios, but about the hard disk. Is it mbr or is
it gpt?


>
>> so he may not get the result he is expecting even if he doe
>> things the "right way".
>


--
Cheers, Carlos.

J.O. Aho

unread,
Dec 31, 2021, 4:08:26 PM12/31/21
to

On 31/12/2021 19.22, micky wrote:
> In alt.comp.os.windows-10, on Fri, 31 Dec 2021 11:52:49 +0100, "J.O.
> Aho" <us...@example.net> wrote:
>
>> On 31/12/2021 00.37, Carlos E.R. wrote:
>>> On 30/12/2021 21.30, micky wrote:
>>
>>>>
>>>>      computer/usr/lib/syslinux/mbr/mbr.bin  Do you think that could be
>>>> what he meant?     ???   Should I use that in the previous command, as
>>>> in:
>>>>     sudo dd if=computer/usr/lib/syslinux/mbr/mbr.bin of=/dev/sda1
>>>
>>> That method will probably destroy your "disk".
>>
>> No, he will just destroy the first partition, the second partition will
>> still be accessible, but he will have no way of restoring the first
>> partition.
>
> But maybe I'll still be able to reformat it??

Sure, it will not break the hard drive so that you can't use it, there
is a good command in Linux that will make the hard drive more the state
it had never been used, but we reveal that command if needed, so that
you won't go and do something you shouldn't do at this point.


>> In OP case it's in a subdirectory called mbr according to other thread
>> he posted on, so the correct path would be /usr/lib/syslinux/mbr/mbr.bin
>>
>> As the file wasn't located in the same place as in the instruction he
>> was following, hee hasn't managed to mess up his hard drive yet. Also we
>> don't know if he uses mbr or gpt (think this is the default in ms-win-10
>> install),
>
> I can't find the first time you brought that up, but it's mbr. The
> bios has accomodation for both, but still they are using mbr, I don't
> know why.

if you run:
sudo fdisk -l /dev/sda

what does it say about "Disklabel type"?

don't hurt to check that once more.


> (Maybe the bios got upgraded, but the
> whatever-you-call-mbr-vs-gpt didn't?)

Update of BIOS will not change the disk label type, changing type will
cause you to loose all data.
On the other hand there are BIOS settings that can cause ms-win to want
to install and uefi supporting setup instead of the old "less secure"
type with mbr.

--

//Aho

Carlos E.R.

unread,
Dec 31, 2021, 4:16:07 PM12/31/21
to
That is obsolete.

In current Linux, ALL disks use names such as sda, sdb... and none use
the anciend hda, hdb... Software wise, they all use the SCSI driver even
if they are "normal hard disks", using PATA or SATA.


See? That page is too old and maybe incorrect in parts.



>>> What do I do now? When giving the instructions to use the Auto method,
>>> either the author made a typo of some sort, or they had renamed it, when
>>> he said boot-loader instead of boot-repair. Maybe that's true in this
>>> line too?
>>>
>>> What does usr/lib/syslinux/mbr.bin mean?
>>
>> /usr/lib/syslinux/mbr.bin is a file. In this case, it is the generic
>> code that is usually installed on the MBR of a hard disk, the version
>> created by the syslinux people.
>>
>>>
>>> What does dd if= mean?
>>
>> dd is the command, and it stands for "convert and copy a file".
>>
>> if= means "the input file is equal to"
>>
>>>
>>> What does of= mean?
>>
>> of= means "the output file is equal to"
>
> This helps.

Good.



>>> I found the Files icon and looked for the file it says is not there.
>>> Found a couple with partial similarities, but then found:
>>>
>>> computer/usr/lib/syslinux/mbr/mbr.bin Do you think that could be
>>> what he meant? ??? Should I use that in the previous command, as
>>> in:
>>> sudo dd if=computer/usr/lib/syslinux/mbr/mbr.bin of=/dev/sda1
>>
>> That method will probably destroy your "disk".
>
> Sounds bad.

Intentionally ;-)


>>> where I think sda1 is the reserved partition and sda2 is the windows
>>> partition on the same SDD. Actually, should I be doing this to the
>>> Reserved Partition or the one with Windows in it?
>>
>> No, it has to be done on "sda", not "sda1" nor "sda2".
>
> I get it now. He had said "Don’t forget to replace sda with the
> Windows 10 system drive." but he just means it might be sdb.

Correct.


>> It is very dangerous to touch things you don't understand. The 'dd'
>> command can actually destroy your disk in a second if used incorrectly.
>>
>>
>> The correct command, in _my_ computer, would be
>>
>> sudo dd if=/usr/share/syslinux/mbr.bin of=/dev/sda
>>
>> In your computer it is probably
>>
>> sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
>>
>>
>> If it failed, you probably typed it wrong.
>>
>> do
>>
>> ls /usr/lib/syslinux/
>> ls /usr/lib/
>> ls /usr/
>> ls /
>>
>> and paste here the result.
>
> I plan to do that.

Somebody else wrote what the current location of the file should be.


>>
>>
>>
>>> These were the remaining two instructions. Didn't try them.usr
>>> sudo apt-get install mbr
>>> sudo install-mbr -i n -p D -t 0 /dev/sda
>
> Maybe a bigger problem in all this is that he only gives instructions on
> replacing the mbr. AFAIK I've already done that more than once, using
> the Win10 installation usb, Hirens, Lazesoft. The problem is that the
> third or fourth instruction in the list doesn't work (or sometimes the
> software doesn't say what doesn't work, or it thinks it all worked but
> it didn't.)
>
>>> It also lists /dev/loop0. What could that be?
>>> It contains lost+found, upper, and work!!
>>
>> Dunno.
>>
>>>
>>>
>>> BTW, I found a whole page on Toms Hardware where someone said he heard
>>> you can use Ubuntu to repair Windows and everyone said, No you can't do
>>> that. This has not yet worked when I'm writing this, but they'd never
>>> even heard of it. Might have been when it just came out.
>>
>> It can be done, but you need to know what you are doing.
>
> I've found that things can always get worse, but at the moment I don't
> think I can make this worse.
>
> Worst comes to worst, I wipe it and start from scratch, or bearing in
> mind that I managed to ruin a $2 flashdrive, even while following
> Macrium's directions, maybe I can ruin this entire SSD. I don't like
> spending money but even that I can afford to replace if I have too.

Hardly :-)

At worst, a reformat would restore the SSD.


> When I bought this refurbished PC, and it had an SDD, I thought it wwas
> a new drive because I didn't think they sold PC's with SDDs then, but
> since then I'm pretty sure they did and my SDD was used, who knows how
> much. It also has an HDD and I'm sure that was original too.

Ok, do:

sudo smartctl -a /dev/sda

(I am assuming that "smartctl" is already installed. If not, somebody
familiar with Ubuntu can tell you the specifics).

The output will be similar to this (watch for line wrap):


Erebor:~ # smartctl -a /dev/sda
smartctl 7.0 2019-05-21 r4917 [x86_64-linux-5.3.18-lp152.106-default]
(SUSE RPM)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family: Crucial/Micron BX/MX1/2/3/500, M5/600, 1100 SSDs
Device Model: Crucial_CT525MX300SSD1
Serial Number: ....
LU WWN Device Id: 5 00a075 117eea2e5
Firmware Version: M0CR060
User Capacity: 525,112,713,216 bytes [525 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Form Factor: 2.5 inches
Device is: In smartctl database [for details use: -P show]
ATA Version is: ACS-3 T13/2161-D revision 5
SATA Version is: SATA 3.2, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is: Fri Dec 31 22:12:21 2021 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

...

further down

...

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE
UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 100 100 000 Pre-fail
Always - 1
5 Reallocate_NAND_Blk_Cnt 0x0032 100 100 010 Old_age
Always - 1
9 Power_On_Hours 0x0032 100 100 000 Old_age
Always - 5034

...


See? My SSD disk has 5034 hours of use.


This other line is interesting:

202 Percent_Lifetime_Remain 0x0030 099 099 001 Old_age
Offline - 1


99% of life remaining.



>
> But if I didn't have problems, I woudln't have problems to solve. i
> love solving mechanical and computer problems, even if I fail sometimes.
>

:-)

--
Cheers, Carlos.

J.O. Aho

unread,
Dec 31, 2021, 4:22:43 PM12/31/21
to
The device naming depends on the driver used for the disk controller,
PATA types (those before SATA with the really broad disk cable) will
appear as hdX. Most people do not have PATA device on their computers
nowadays, so the devices appears as sdX both for SATA and SCSI.

The s is for SCSI and not Serial and the Serail ATA devices are just
treated as if they were SCSI devices.

nvme is another beast and do not work the same way as SATA...


--

//Aho

J.O. Aho

unread,
Dec 31, 2021, 4:32:49 PM12/31/21
to
Depends on how old hardware you are using, not all the PATA devices got
a new driver, those will still appear as hdX, but I think the number of
people using pre-2k hardware is quite slim.


> See? That page is too old and maybe incorrect in parts.

I do agree that the page is old and missing steps like ensuring that the
disk you have uses mbr.


--

//Aho

Carlos E.R.

unread,
Dec 31, 2021, 4:52:06 PM12/31/21
to
I don't know/have forgotten :-D

I do have such hardware, but those machines have correspondingly old
software, so I can't verify how they are seen now.

>
>
>> See? That page is too old and maybe incorrect in parts.
>
> I do agree that the page is old and missing steps like ensuring that the
> disk you have uses mbr.

Yep.


--
Cheers, Carlos.

micky

unread,
Dec 31, 2021, 5:12:13 PM12/31/21
to
In alt.comp.os.windows-10, on Fri, 31 Dec 2021 22:02:33 +0100, "Carlos
It's mbr. There's no doubt about that. My last sentence was
speculation why they put an mbr disk in a pc that was capable of gpt?

Or maybe they all are and I'm confusing UEFI with GPT? No, I just
checked and they go together. And I gather GPT is better than MBR. So
why didn't they build the pc with GPT? They use the same drives and
there is no added cost, right? (They don't have to pay some royalty
for GPT?) So the speculation was it was all mbr when it started, but
someone, maybe the refurbisher, upgraded the BIOS but that left the
setting at MBR even though the updated BIOS could do both, and he left
it that way too.

micky

unread,
Dec 31, 2021, 5:24:40 PM12/31/21
to
In alt.comp.os.windows-10, on Fri, 31 Dec 2021 22:08:24 +0100, "J.O.
Aho" <us...@example.net> wrote:

>
>On 31/12/2021 19.22, micky wrote:
>> In alt.comp.os.windows-10, on Fri, 31 Dec 2021 11:52:49 +0100, "J.O.
>> Aho" <us...@example.net> wrote:
>>
>>> On 31/12/2021 00.37, Carlos E.R. wrote:
>>>> On 30/12/2021 21.30, micky wrote:
>>>
>>>>>
>>>>>      computer/usr/lib/syslinux/mbr/mbr.bin  Do you think that could be
>>>>> what he meant?     ???   Should I use that in the previous command, as
>>>>> in:
>>>>>     sudo dd if=computer/usr/lib/syslinux/mbr/mbr.bin of=/dev/sda1
>>>>
>>>> That method will probably destroy your "disk".
>>>
>>> No, he will just destroy the first partition, the second partition will
>>> still be accessible, but he will have no way of restoring the first
>>> partition.
>>
>> But maybe I'll still be able to reformat it??
>
>Sure, it will not break the hard drive so that you can't use it, there
>is a good command in Linux that will make the hard drive more the state
>it had never been used, but we reveal that command if needed, so that
>you won't go and do something you shouldn't do at this point.

ROTFL

>>> In OP case it's in a subdirectory called mbr according to other thread
>>> he posted on, so the correct path would be /usr/lib/syslinux/mbr/mbr.bin
>>>
>>> As the file wasn't located in the same place as in the instruction he
>>> was following, hee hasn't managed to mess up his hard drive yet. Also we
>>> don't know if he uses mbr or gpt (think this is the default in ms-win-10
>>> install),
>>
>> I can't find the first time you brought that up, but it's mbr. The
>> bios has accomodation for both, but still they are using mbr, I don't
>> know why.
>
>if you run:
>sudo fdisk -l /dev/sda
>
>what does it say about "Disklabel type"?

I'll check. I have to build up for a day or two each time I attack this
problem.

>don't hurt to check that once more.

All those times when I did bootrec /mbr , wouldn't it have given me a
message if the disk wasn't mbr? Maybe it wouldn't have been sarcastic
or insulting like on ACOW10, from no one posting in this thread. Some
polite message.

>
> > (Maybe the bios got upgraded, but the
> > whatever-you-call-mbr-vs-gpt didn't?)
>
>Update of BIOS will not change the disk label type, changing type will
>cause you to loose all data.

No, what I mean is the capability of the BIOS got upgraded, but the BIOS
remained set to use mbr and the disk remained mbr.

I think the refurbisher wiped the disk and reinatalled windows, so he
could have reformatted it to gpr before he did that, but maybe he
thought there was a reason not to. I vaguely think he gave me both the
original product code and his later one, iirc.

Somewhere I had his name, and phone and I'm sure he would answer
questions like this**. But it's hard to find. I bought the thing on
Amazon, of all places, and I can look up my order and see the ad but
there have been several refurbishers listed for the same ad, some
make/model pc, and I didn't recognize the two listed there now.

**I've found if you call places an hour before closing, often they've
done all their work and are happy to talk much longer than if you call
earlier.

>On the other hand there are BIOS settings that can cause ms-win to want
>to install and uefi supporting setup instead of the old "less secure"
>type with mbr.

Okay.

Paul

unread,
Dec 31, 2021, 6:14:00 PM12/31/21
to
On 12/31/2021 5:12 PM, micky wrote:

>
> It's mbr. There's no doubt about that. My last sentence was
> speculation why they put an mbr disk in a pc that was capable of gpt?
>
> Or maybe they all are and I'm confusing UEFI with GPT? No, I just
> checked and they go together. And I gather GPT is better than MBR. So
> why didn't they build the pc with GPT? They use the same drives and
> there is no added cost, right? (They don't have to pay some royalty
> for GPT?) So the speculation was it was all mbr when it started, but
> someone, maybe the refurbisher, upgraded the BIOS but that left the
> setting at MBR even though the updated BIOS could do both, and he left
> it that way too.

+------+-------------+-------------+-------------+-------------+
| MBR | Primary #1 | Primary #2 | Primary #3 | Primary #4 | Legacy
+------+-------------+-------------+-------------+-------------+ MSDOS example

I'm just drawing what little I know, not extracted from Wiki. In the following
diagrams, you could have 128 partitions max (and not enough Windows drive letters).
I didn't want to distract you from the details, by putting more partition detail.
This is just intended to show if you "converted to GPT" what it would look like.
The GPT tables are not visible in partitioning tools. But the ESP can be seen.

+------+--+-------------+-------------+-------------+-------------+--+
| MBR | | #1 | #2 | #3 | #4 | | GPT
+------+--+-------------+-------------+-------------+-------------+--+ Data disk
^ ^ ^ (BIOS does not care)
| | |
| Main GPT table Backup GPT table
|
(Fake) Protective partition declaration to prevent legacy screwups

+------+--+-----+-------------+-------------+-------------+-------------+--+
| MBR | | ESP | #1 | #2 | #3 | #4 | | GPT
+------+--+-----+-------------+-------------+-------------+-------------+--+ Boot disk
^ ^ \___ EFI System Partition (FAT32) ^ (UEFI to parse etc)
| | |
| Main GPT table Backup GPT table
|
0xEE partition declaration ( https://www.win.tue.nl/~aeb/partitions/partition_types-1.html )

You can turn a 1TB disk drive into a GPT. And OEMs frequently do this
now. Even small disks that don't need GPT, can end up that way on a
Dell or HP or Acer.

Tools vary, in the level of detail they show. For example, a "Microsoft Reserved"
partition, 16MB in size, that contains no file system, and is there as a
source of slack space for manipulations, some tools will not show it, because
there's not much point. However, from a partition numbering perspective
"every partition matters", and everything really should be shown for
informative results. Disk Management in Windows might not show the tiny 16MB
thing.

You can use "gnome-disks" in Linux, for a graphical representation.

In Linux, you can use commandline GDisk with GPT disks. GDisk can tell
you whether the disk is GPT or MSDOS legacy.

sudo gdisk /dev/sda

but take your time before rapidly typing stuff in. If the
GPT disk is "malformed", such as what happened to me the
other day, gdisk will start asking questions. Slow down
and read the screen before (eventually) typing "p" to print
the tables, and "q" to quit.

In the last picture, the ESP doesn't have to be first. It can be
stuffed in later. I don't want to give a mis-impression, that
there can't be curve balls in there. You have to know your
customer, what level of "screwing around" they're capable of doing,
to properly ask questions about what is there. The UEFI BIOS cannot
make any assumptions, and it has to follow the rules to find stuff.

Paul

David W. Hodgins

unread,
Dec 31, 2021, 6:26:19 PM12/31/21
to
On Fri, 31 Dec 2021 17:12:11 -0500, micky <NONONO...@fmguy.com> wrote:
> Or maybe they all are and I'm confusing UEFI with GPT? No, I just
> checked and they go together. And I gather GPT is better than MBR. So

Despite persistent rumors of that being the case, it's false. The uefi firmware
does not require gpt. It works just as well with mbr. The mbr drive size is limited
to 2TB, though so if the drive is larger gpt must be used to be able to use all of
the drive. Any website claiming that uefi requires gpt is wrong and should not be
used as a source for correct information.

Most bios firmware can work with gpt too, though some require that the boot drive
be mbr or a hybrid gpt with mbr.

Regards, Dave Hodgins

Paul

unread,
Dec 31, 2021, 6:47:51 PM12/31/21
to
Look in your junk box for old cards.

Promise Ultra133 TX2 PCI
SIL0680 dual IDE (use the non-RAID firmware) PCI
JMB363 (single IDE) but may show as sdx anyway (PCI Express)
VIA has PCI cards with IDE

The PC I had which died around two months ago, had
a JMB chip onboard. But it's gone now, so I cannot do
any demos. The nice thing about the JMB, is the firmware
did not lock out the making of HPA (Host Protected Area).
That's why I liked it. You could put an IDE to SATA adapter
on it, and do HPAs on SATA. Why put an HPA on a SATA drive ?
Why, to test RAID arrays and get a rebuild to finish in ten minutes :-)
That's why you do it. For test. You can turn giant drives into
tiny drives, while testing RAID software.

Paul

Carlos E.R.

unread,
Dec 31, 2021, 8:00:07 PM12/31/21
to
Because it can be done.

>
> Or maybe they all are and I'm confusing UEFI with GPT? No, I just
> checked and they go together. And I gather GPT is better than MBR. So
> why didn't they build the pc with GPT? They use the same drives and
> there is no added cost, right? (They don't have to pay some royalty
> for GPT?) So the speculation was it was all mbr when it started, but
> someone, maybe the refurbisher, upgraded the BIOS but that left the
> setting at MBR even though the updated BIOS could do both, and he left
> it that way too.

It is easy to put a GPT disk on a BIOS only machine. I do.

It is also easy to put MBR disk on UEFI machines. I do.


Don't speculate, find out. You have been told of commands that will tell
you with exactitude.




--
Cheers, Carlos.

Carlos E.R.

unread,
Dec 31, 2021, 8:12:07 PM12/31/21
to
On 01/01/2022 00.26, David W. Hodgins wrote:
> On Fri, 31 Dec 2021 17:12:11 -0500, micky <NONONO...@fmguy.com> wrote:
>> Or maybe they all are and I'm confusing UEFI with GPT? No, I just
>> checked and they go together.  And I gather GPT is better than MBR.  So
>
> Despite persistent rumors of that being the case, it's false. The
> uefi firmware does not require gpt. It works just as well with mbr.
> The mbr drive size is limited to 2TB, though so if the drive is
> larger gpt must be used to be able to use all of the drive. Any
> website claiming that uefi requires gpt is wrong and should not be
> used as a source for correct information.

About the 2TiB size limit, it is more complicated. See, for instance,
first answer on this thread:

https://superuser.com/questions/1028238/mbr-max-of-2tib-on-each-partition-or-on-disk


> Most bios firmware can work with gpt too, though some require that the
> boot drive
> be mbr or a hybrid gpt with mbr.

Just a syslinux MBR :-)

I don't remember which one exactly, but I have one machine with it.

--
Cheers, Carlos.

Mark Lloyd

unread,
Jan 1, 2022, 2:18:49 PM1/1/22
to
NVMe drives have more complicated names. Mine here is called:

/dev/nvme0n1

It has 2 partitions on it, called:

/dev/nvme0n1p1
/dev/nvme0n1p2

The first is the EFI partition.

--
Mark Lloyd
http://notstupid.us/

"Eat grass - Millions of cows can't be wrong."

Carlos E.R.

unread,
Jan 1, 2022, 2:44:07 PM1/1/22
to
On 01/01/2022 20.18, Mark Lloyd wrote:
> On 12/31/21 12:34, Chris Elvidge wrote:
>> On 31/12/2021 18:13, micky wrote:
>>
>>>
>>> It wasn't exactly at random.  I found a webpage that explained what the
>>> instruction meant and it said /sda was the first SCSI disk, and /hda was
>>> the first hard disk.   But I don't think anyone here is using SCSI and
>>> yet no one objected to sda.
>>
>> That's what you get for reading out-of-date documents.
>> Linux kernel/udev changed from /dev/hda etc. to /dev/sda etc. a long
>> time ago. All hard disks are now /dev/sda etc.; s is serial. (Except
>> nvme drives AFAIK.)
>
> NVMe drives have more complicated names. Mine here is called:
>
> /dev/nvme0n1
>
> It has 2 partitions on it, called:
>
> /dev/nvme0n1p1
> /dev/nvme0n1p2
>
> The first is the EFI partition.

Quoting an explanation from here:

Archived-At:
<https://lists.opensuse.org/archives/list/us...@lists.opensuse.org/message/BZ2HRNLEQFMFN3EILL3W7MVPSR4JNIGZ/>

Long answer: https://zonedstorage.io/introduction/zns/

Short answer:
NVMe allows systems to use the drive in a more direct way, than old SSD
drives did. One of new features are "namespaces", which allow to divide
the drive into separate regions, where each namespace has it's own
management of flash blocks. In the most simple (and default) case, the
disk is a single namespace, used like a normal disk, with partition table.
Summarizing: /dev/nvme0 represents first (zeroth?) device and allows to
configure namespaces on it, /dev/nvme0n1 is a first namespace,
/dev/nvme0n1p1 is a first partition.


--
Cheers, Carlos.

micky

unread,
Jan 1, 2022, 6:09:52 PM1/1/22
to
In alt.comp.os.windows-10, on Fri, 31 Dec 2021 18:34:43 +0000, Chris
Elvidge <ch...@mshome.net> wrote:

>On 31/12/2021 18:13, micky wrote:
>
>>
>> It wasn't exactly at random. I found a webpage that explained what the
>> instruction meant and it said /sda was the first SCSI disk, and /hda was
>> the first hard disk. But I don't think anyone here is using SCSI and
>> yet no one objected to sda.
>
>That's what you get for reading out-of-date documents.

True, but on many online documents it's very hard to find the date.

Sometimes the only date I can find is in the google search entry.

Also, that's why I came here and asked about it. ;-)

>Linux kernel/udev changed from /dev/hda etc. to /dev/sda etc. a long
>time ago. All hard disks are now /dev/sda etc.;

Good to know

micky

unread,
Jan 1, 2022, 6:15:52 PM1/1/22
to
In alt.comp.os.windows-10, on Fri, 31 Dec 2021 22:15:46 +0100, "Carlos
I see. I'm glad I asked.
>>
>>>> What do I do now? When giving the instructions to use the Auto method,
>>>> either the author made a typo of some sort, or they had renamed it, when
>>>> he said boot-loader instead of boot-repair. Maybe that's true in this
>>>> line too?
>>>>
>>>> What does usr/lib/syslinux/mbr.bin mean?
>>>
>>> /usr/lib/syslinux/mbr.bin is a file. In this case, it is the generic
>>> code that is usually installed on the MBR of a hard disk, the version
>>> created by the syslinux people.
>>>
>>>>
>>>> What does dd if= mean?
>>>
>>> dd is the command, and it stands for "convert and copy a file".
>>>
>>> if= means "the input file is equal to"
>>>
>>>>
>>>> What does of= mean?
>>>
>>> of= means "the output file is equal to"
>>
>> This helps.
>
>Good.
>
>
>
>>>> I found the Files icon and looked for the file it says is not there.
>>>> Found a couple with partial similarities, but then found:
>>>>
>>>> computer/usr/lib/syslinux/mbr/mbr.bin Do you think that could be
>>>> what he meant? ??? Should I use that in the previous command, as
>>>> in:
>>>> sudo dd if=computer/usr/lib/syslinux/mbr/mbr.bin of=/dev/sda1
>>>
>>> That method will probably destroy your "disk".
>>
>> Sounds bad.
>
>Intentionally ;-)

LOL
>
>>>> where I think sda1 is the reserved partition and sda2 is the windows
>>>> partition on the same SDD. Actually, should I be doing this to the
>>>> Reserved Partition or the one with Windows in it?
>>>
>>> No, it has to be done on "sda", not "sda1" nor "sda2".
>>
>> I get it now. He had said "Don’t forget to replace sda with the
>> Windows 10 system drive." but he just means it might be sdb.
>
>Correct.

Check.

>>> It is very dangerous to touch things you don't understand. The 'dd'
>>> command can actually destroy your disk in a second if used incorrectly.
>>>
>>>
>>> The correct command, in _my_ computer, would be
>>>
>>> sudo dd if=/usr/share/syslinux/mbr.bin of=/dev/sda
>>>
>>> In your computer it is probably
>>>
>>> sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
>>>
>>>
>>> If it failed, you probably typed it wrong.
>>>
>>> do
>>>
>>> ls /usr/lib/syslinux/
>>> ls /usr/lib/
>>> ls /usr/
>>> ls /
>>>
>>> and paste here the result.
>>
>> I plan to do that.
>
>Somebody else wrote what the current location of the file should be.

I saw that.
Good.
>
>> When I bought this refurbished PC, and it had an SDD, I thought it wwas
>> a new drive because I didn't think they sold PC's with SDDs then, but
>> since then I'm pretty sure they did and my SDD was used, who knows how
>> much. It also has an HDD and I'm sure that was original too.
>
>Ok, do:
>
>sudo smartctl -a /dev/sda

Okay.
Day and night for 200 days.
>
>This other line is interesting:
>
>202 Percent_Lifetime_Remain 0x0030 099 099 001 Old_age
>Offline - 1
>
>
>99% of life remaining.

Wow. That implies it can last for 20,000 days. That's 50 years.

micky

unread,
Jan 1, 2022, 7:59:27 PM1/1/22
to
In alt.comp.os.windows-10, on Fri, 31 Dec 2021 22:15:46 +0100, "Carlos
E.R." <robin_...@es.invalid> wrote:

>
>> When I bought this refurbished PC, and it had an SDD, I thought it wwas
>> a new drive because I didn't think they sold PC's with SDDs then, but
>> since then I'm pretty sure they did and my SDD was used, who knows how
>> much. It also has an HDD and I'm sure that was original too.
>
>Ok, do:
>
>sudo smartctl -a /dev/sda
>
>(I am assuming that "smartctl" is already installed. If not, somebody
>familiar with Ubuntu can tell you the specifics).

It says command not found.

I can do this later, after I have everything working!

Micky

Jonathan N. Little

unread,
Jan 1, 2022, 11:05:11 PM1/1/22
to
micky wrote:> In alt.comp.os.windows-10, on Fri, 31 Dec 2021 22:15:46
+0100, "Carlos
> E.R." <robin_...@es.invalid> wrote:

<snip>

>> sudo smartctl -a /dev/sda
>>
>> (I am assuming that "smartctl" is already installed. If not, somebody
>> familiar with Ubuntu can tell you the specifics).
>
> It says command not found.
>
> I can do this later, after I have everything working!

Because it is not installed by default in a live session

Jerry Peters

unread,
Jan 3, 2022, 4:52:26 PM1/3/22
to
And mmc drives: firsat mmc device: mmcblk0. First partition: mmvblk0p1.
SDHC cards are mmc devices.

>
>
0 new messages