> > On Thu, 13 Apr, 2017, 20:27:03 +0000, Ady Ady via Syslinux wrote: > > > > > I used syslinux to make an external usb hard drive booting up > "system rescue cd" from a FAT primary partition. > > > The procedure I followed was setting on the boot flag on the FAT > partition and copying the content of the iso image to it and renaming > isolinux to syslinux wherever needed. I then unmounted the device and > ran "syslinux -d /syslinux/ -i /dev/sdxn" where sdxn is the appropriate > partition. It worked nicely on both laptops i have at hand. > > > > > > Then I wanted to try the same using an ext2 partition instead and > so using extlinux. For this, after creating an ext2 partition, moving > the boot flag to it and copying the live linux files, I copied the file > mbr.bin from the syslinux package to the hard drive mbr. Then I ran > "extlinux -i /mnt/mountpoint". This time booting up "system rescue cd" > failed on one of the two laptops. Afterwards even retrying to boot from > the FAT partition resulted with the same computer in failing. I hadn't > saved the initial mbr content, so couldn't restore it, hence mbr.bin > should still be in place and this might be what the failing laptop > doesn't like. > > > > > > > (snip) > > > > How _exactly_ did you "copy" (again) the mbr.bin file (and why again)? > > Which command did you use? Before you executed such command, was the > > filesystem volume mounted or unmounted? > > > > Please post the exact command you used for formatting the FAT volume. > > Please also post the command you used when creating the ext2 volume. > > > > If you repeat the _whole_ initial procedure you described (installing > > mbr.bin, then using FAT and the 'syslinux' installer), can you boot > > then? > > > > Regards, > > Ady. > > again? actually for the first test, i.e. booting from the FAT partition > I > didn't put mbr.bin to the hard drive's mbr. I just executed the step as > I > described. > > I paid attention to mbr.bin only when I started to be interested in > bootting > off an ext2/3 partition. And that's because it was mentionned in the > tutorial > I looked at, which this one : > http://www.syslinux.org/wiki/index.php?title=EXTLINUX, and I used the > exact > same command i.e. "cat mbr.bin > /dev/sdx" where sdx is the master > device and > while no partition of the device was mounted. > > The FAT volume was formatted by gparted. For the ext2 partition I used > '$mke2fs -t ext2 -L "sysrescd" /dev/sdxn'. I always use fdisk to toggle > the > boot flag. > > As i said this time the device is failing to boot on one of the two > laptops. > Maybe I should have mentionned that it meant the other booted fine for > cases > described in my initial email i.e. in the first test with the FAT > partition > before paying attention to mbr.bin, in the case of the ext2 partition > after > having modified the device's mbr by copying to it mbr.bin as described, > and > in the case I reattempted to boot off the FAT partition while the mbr > of the > device was modified.Please next time reply to the Syslinux Mailing List email address. I am aware that the EXTLINUX wiki page mentions 'cat' as a method to write mbr.bin. The reason for that wiki page to present such command is because the official documentation included to this day in the Syslinux distribution archives is also presenting the same command. The suggested command to write to the MBR area is to first _unmount_ all the devices related to the physical device you want to write to, and then execute the 'dd' command as described at: http://www.syslinux.org/wiki/index.php/Mbr#Write Beware: use the correct "sdx" device for your case / OS; writing to 'sda" if the device you are aiming at is a different one will cause you much more problems. I would also add the 'sync' command, after dd'ing the mbr.bin file to the desired output device and/or after finishing any write operation to a portable device you are about to disconnect. Having said that, there are many reasons for a system to fail to boot correctly, especially when using an external device. Some of them are: _ mixing different versions of Syslinux-related files (although, since the device successfully boots another system, this doesn't seem to be the problem); _ CHS geometry; _ type of connection (e.g. USB 2.0 vs. 3.0) _ booting as USB-Floppy (or some other mode) in the BIOS setting while having a different type of device (e.g. USB-HDD); _ using a BIOS-based bootloader on a UEFI system while in UEFI mode, or some inverted situation... There are many more alternative explanations / possibilities. Saying "it fails to boot" doesn't really describe anything useful that would help in narrowing down the problem. We don't know what exactly you actually see on screen (blinking cursor perhaps?), or whether it reboots, or perhaps the connection/port/hardware is not "stable" enough... I'm not saying that one of these is the actual problem, but rather that we lack of enough information. I would suggest repeating the procedure with the FAT fs, this time using dd to write the MBR. Please note the correct device you are about to write to. Otherwise, you will overwrite the wrong device, making things even worse. Also note that the mbr.bin file shall be written to "sdX" (where "X" here represents the adequate device, and you should replace it with the adequate letter), and it is _not_ "sdx1" (i.e. do not use a partition device when writing the mbr.bin file). Regards, Ady.
On Fri, 14 Apr, 2017, 0:05:05 +0000, Ady Ady via Syslinux wrote: [ ... ]> > Please next time reply to the Syslinux Mailing List email address. > > I am aware that the EXTLINUX wiki page mentions 'cat' as a method to > write mbr.bin. The reason for that wiki page to present such command is > because the official documentation included to this day in the Syslinux > distribution archives is also presenting the same command. > > The suggested command to write to the MBR area is to first _unmount_ > all the devices related to the physical device you want to write to, > and then execute the 'dd' command as described at: > > http://www.syslinux.org/wiki/index.php/Mbr#Write > > Beware: use the correct "sdx" device for your case / OS; writing to > 'sda" if the device you are aiming at is a different one will cause you > much more problems. > > I would also add the 'sync' command, after dd'ing the mbr.bin file to > the desired output device and/or after finishing any write operation to > a portable device you are about to disconnect. > > Having said that, there are many reasons for a system to fail to boot > correctly, especially when using an external device. Some of them are: > _ mixing different versions of Syslinux-related files (although, since > the device successfully boots another system, this doesn't seem to be > the problem); > _ CHS geometry; > _ type of connection (e.g. USB 2.0 vs. 3.0) > _ booting as USB-Floppy (or some other mode) in the BIOS setting while > having a different type of device (e.g. USB-HDD); > _ using a BIOS-based bootloader on a UEFI system while in UEFI mode, or > some inverted situation... > > There are many more alternative explanations / possibilities. > > Saying "it fails to boot" doesn't really describe anything useful that > would help in narrowing down the problem. We don't know what exactly > you actually see on screen (blinking cursor perhaps?), or whether it > reboots, or perhaps the connection/port/hardware is not "stable" > enough... I'm not saying that one of these is the actual problem, but > rather that we lack of enough information. > > I would suggest repeating the procedure with the FAT fs, this time > using dd to write the MBR. > > Please note the correct device you are about to write to. Otherwise, > you will overwrite the wrong device, making things even worse. Also > note that the mbr.bin file shall be written to "sdX" (where "X" here > represents the adequate device, and you should replace it with the > adequate letter), and it is _not_ "sdx1" (i.e. do not use a partition > device when writing the mbr.bin file). > > Regards, > Ady.As for replying address I noticed that using the "reply" button lead to a reply message with "Ady Ady" in the "To" field of hotmail, thereafter I cancelled and tried "Reply All" and it still showed only "Ady Ady". To get more details about the actual email address I needed to allow all scripts in firefox but with hotmail there are dozens and make more that minutes to display the page. It seems you set your personal email address in the "Reply-To" field. I just realised that in such cases the email client, even mutt, ignores the "To" list, and probably "Cc" too. Anyway ... As for the device file, if you read back my email you'll notice that I indeed took that care about the difference in naming of devices and partitions in linux. That's good you talk about blinking cursor or reboot regarding boot failure. I had indeed well noted that for booting off the ext partition I always get a blinking cursor on the upper left corner of a totally black screen and when trying booting off the FAT partition the computer reboots. I will nevertheless check the port, though I never noticed any problem like that with this computer since the beginning I have it, i.e. ~ ten years. I will repeat the procedure with using dd for writing the mbr and sync afterwards.
On Fri, 14 Apr, 2017, 11:13:43 +0000, Jethro Tull via Syslinux wrote:> On Fri, 14 Apr, 2017, 0:05:05 +0000, Ady Ady via Syslinux wrote: > [ ... ] > > The suggested command to write to the MBR area is to first _unmount_ > > all the devices related to the physical device you want to write to, > > and then execute the 'dd' command as described at: > > > > http://www.syslinux.org/wiki/index.php/Mbr#Write > > > > Beware: use the correct "sdx" device for your case / OS; writing to > > 'sda" if the device you are aiming at is a different one will cause you > > much more problems. > > > > I would also add the 'sync' command, after dd'ing the mbr.bin file to > > the desired output device and/or after finishing any write operation to > > a portable device you are about to disconnect. > >[ ... ]> > > > I would suggest repeating the procedure with the FAT fs, this time > > using dd to write the MBR. > >[ ... ]> > Ady. >[ ... ]> As for the device file, if you read back my email you'll notice that I indeed > took that care about the difference in naming of devices and partitions in > linux.[ ... ]> I will repeat the procedure with using dd for writing the mbr and sync > afterwards.Here it is, I tried following your procedure, i.e. using : $dd if=mbr.bin of=/dev/sdx bs=440 count=1 conv=notrunc $sync where "sdx" is my device. I repeat I indeed used the device file and not any partition file. I took care of using the right device. Mind that hadn't I do so previously, I would have ended up in failing to boot with both computers. This time I only tested with FAT partitions, so I used syslinux command, and I tried both primary and logical partitions. I didn't tell it previously but in my previous tests I had also tried with both primary and logical partitions. The results were the same. I'm trying to make a multi-boot usb hard drive, i.e. hosting several boot programs to be booted upon user choice. Using logical partitions gives more flexibility as for the number ofboot images that I can install on the drive. But I've only tested with one so far. Back to my new tests with use of "dd" and "sync" to copy syslinux bin.mbr to the device's mbr. I got a slighly different result but still it failed on the same computer. The other one booting properly as expected and as previously. This time the failing computer does not reboot, I get the message : "Missing operating system." "Operating System not found" and keep still ... I can reboot the computer with Ctrl + Alt + Del.