You are not logged in.
Pages: 1
I upgraded my Windows partition to Windows 10, but it decided to kill my Syslinux MBR on another drive just because that was the one that was set to primary boot in the BIOS.
In a fit of benevolence, it backed my old MBR up to BOOTSECT.BAK in the fat32 boot partition. As expected, it's 512 bytes and xxd reveals the characters SYSLINUX on the first line, so it looks right so far. I dd'd it back into place with the following:
dd if=/path/mbr-backup of=/dev/sda conv=notrunc
Now it appears as a partitionless disk in lsblk. I see that on the wiki, it suggests the same command without the notrunc.
Please help me understand what I have done wrong (other than install Windows 10 ).
Last edited by Physicist1616 (2016-08-25 19:04:05)
Offline
Windows 10 tells me you may be using GPT https://wiki.archlinux.org/index.php/GU … tion_Table
Not to be confused with MBR
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
If indeed the disk was partitioned as MBR _and_ you have done no other changes, then that should have done the trick. But it depends on how you have nuked the MBR. That said, you can check with fdisk if at least the primary partitions and the first logical partition are listed.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Good thinking, but from the same page, "For Windows, there is no support for booting from a BIOS/GPT partitioning scheme."
My motherboard doesn't support EFI, so it can't boot Windows from a GPT drive at all.
The Linux drive could hypothetically be GPT with MBR style boot, but I'm 95% sure I didn't make this disk GPT either (How long has Syslinux been capable of it?). To confirm, I'm looking for the location and hex code that specifies GPT in the backup MBR, but I haven't found a great diagram to tell me what offset to find yet.
Offline
I'm thinking the BOOTSECT.BAK is invalid. It looks valid, but maybe the Windows process to create it does something screwy instead of a byte for byte copy.
R00KIE, are you saying the notrunc for sure didn't break stuff? It seems like it shouldn't, but I don't know for 100% sure.
Offline
xxd reveals the characters SYSLINUX on the first line
Actually, that doesn't sound right to me. I've xxd'd a syslinux bootsector or two (bios/mbr) and never seen that. You can xxd the appropriate /usr/lib/syslinux/bios/<mbr bin> to see what it should look like.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
Notrunc should not do any harm, although I suppose it might not be needed.
What alphaniner says might be right on the money, syslinux does not have/use the SYSLINUX string in the code. You probably have a borked mbr backup, are you sure you used the right device, as in sda and not sdaX?
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
That got me thinking:
$ xxd /boot/syslinux/ldlinux.sys |head -1
00000000: 0d0a 5359 534c 494e 5558 2036 2e30 3320 ..SYSLINUX 6.03
Though, more likely (sde1 is /boot partition):
# dd if=/dev/sde1 bs=16 count=1 status=none |xxd
00000000: eb58 9053 5953 4c49 4e55 5800 0200 0000 .X.SYSLINUX.....
Last edited by alphaniner (2016-08-24 21:00:51)
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
Thanks for posting that, alphaniner. The string I saw matches your sde1. The BOOTSECT.BAK file is clearly the partition boot sector, not the disk's sector 0.
Having no partition table, I have restored most of the file structure from my home folder by just recreating partitions and fscking in hopes it would find the f2fs table (it did).
Offline
why did you dd 512 bytes and not just the 446 bytes of the actual Bootstrap zone of your drive ?
Offline
Pages: 1