Jump to content











Photo
- - - - -

Booting kernel from USB using Syslinux 4.02/3.82 in intel i7 sandy bridge architecture


  • Please log in to reply
12 replies to this topic

#1 shareknw

shareknw

    Newbie

  • Members
  • 16 posts

Posted 15 August 2011 - 07:32 AM

I want to make a bootable USB using syslinux 4.02/3.82 (any one) and boot kernel image on intel i7 core sandy bridge architecture. I have followed the steps below:
1. fdisk /dev/sdb and made a partition in USB which is bootable.
2. dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdb bs=512 count=1 to install the mbr in the first sector.
3. mkfs.vfat /dev/sdb1
4. syslinux -i /dev/sdb1 o install syslinux.
5. mount /dev/sdb1 /mnt
6. ls /mnt After this, i am able to see ldlinux.sys in USB
7. cp /boot/vmlinuzimage /mnt
8. vi /mnt/syslinux.cfg
default linux
timeout 100
label linux
kernel vmlinuzimage
append root=/dev/sda1
9. umount /mnt

Now, When I boot from USB, I can see only an underscore prompt (_) on screen blinking and nothing happens after this. I am not able to boot the image using syslinux on intel i7. Kindly let me know:
a. DoI require special configuration settings in the syslinux.cfg file for suporting sandy bridge(intel i7)?
b. or the kernel image is required in some special format or specific naming convention?
c. or any step which I am missing while installing syslinux on pendrive?

#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 15 August 2011 - 08:02 AM

2. dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdb bs=512 count=1 to install the mbr in the first sector.


NO. :( :frusty:

Meaning that you did NOT :w00t::

install the mbr in the first sector


What you did was :ph34r::

I completely overwrote the MBR with another one, thus changing both the CODE part of the MBR and the DATA part (partition table), so that the disk is NOT anymore bootable as the previous partition table I wrote with fdisk while partitioning was overwritten with the whatever DATA was inside mbr.bin (possibly all 00's).


:cheers:
Wonko

#3 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 15 August 2011 - 01:27 PM

Meaning that you did NOT :w00t::

So true. The documentation is in syslinux/doc/syslinux.txt.

...
A simple MBR, roughly on par with the one installed by DOS (but
unencumbered), is included in the SYSLINUX distribution. To install
it under Linux, simply type:

cat mbr.bin > /dev/XXX

... where /dev/XXX is the device you wish to install it on.

Under DOS or Win32, you can install the SYSLINUX MBR with the -m
option to the SYSLINUX installer, and use the -a option to mark the
current partition active:

syslinux -ma c:
...



#4 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 15 August 2011 - 01:38 PM

So true. The documentation is in syslinux/doc/syslinux.txt.

True. :thumbup:
But would that apply to 64 bit systems? :unsure:
Or does the mbr need to be recompiled to work on an intel i7 sandy bridge architecture? :dubbio:

;)

:cheers:
Wonko

#5 shareknw

shareknw

    Newbie

  • Members
  • 16 posts

Posted 16 August 2011 - 12:19 PM


NO. :( :frusty:

Meaning that you did NOT :w00t::



What you did was :ph34r::



:cheers:
Wonko


I am sorie but i did not mention any number in the instruction. My 2nd and 3rd steps were:
2. dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdb (to install the mbr in the first sector. This installed first 440 bytes in the 1st sector).
3. mkfs.vfat -F32 /dev/sdb1

When I boot on sandy bridge architecture (64 bit system), I am getting a blinking cursor on the screen and nothing happens further. Kindly let me know which step i am missing.

#6 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 16 August 2011 - 01:57 PM

I am sorie but i did not mention any number in the instruction. My 2nd and 3rd steps were:
2. dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdb (to install the mbr in the first sector. This installed first 440 bytes in the 1st sector).
3. mkfs.vfat -F32 /dev/sdb1

When I boot on sandy bridge architecture (64 bit system), I am getting a blinking cursor on the screen and nothing happens further. Kindly let me know which step i am missing.

Do you see dd in my quotation of the documentation? The correct answer is "no." That means that you need to read the documentation.

---EDIT---

Should have left the post alone the first time. :wacko:
Using cat (as the documentation suggests to use) as roughly akin to:

dd if=/usr/src/syslinux/mbr.bin of=/dev/sdb bs=1 count=440



#7 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 16 August 2011 - 02:30 PM

Well, this is not what you originally posted, which was:

2. dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdb bs=512 count=1 to install the mbr in the first sector.

Aren't bs=512 and count=1 actually numbers? :unsure:

Would inverting them to:

2. dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdb bs=1 count=512 to install the mbr in the first sector.

change result?


Would changing them to:

2. dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdb bs=1 count=440 to install the mbr in the first sector.

change result?


Anyway, provided that you did not overwrite the partition table, the blinking cursor is usually connected to either of:
  • wrong geometry in the PBR
  • unbalanced CHS/LBA in the partition table in the MBR.
  • wrong "Sectors Before" or "Hidden sectors" in the PBR
Since you used mkfs.vfat, it is possible that you have both a "wrong" geometry and a "wrong" number of "Sectors Before" :unsure:


As well it is possible that somehow your BIOS or whatever detected the device incorrectly.
Why don't you snapshot both the current MBR and current PBR, compress them together into a .zip file, upload the archive on a free hosting site and post a link to it?

This way we may review the result and possibly give you some advice.

:cheers:
Wonko

#8 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 16 August 2011 - 04:13 PM

Suggestions

1. Use Windows and RMPrepUSB to make a syslinux bootable drive - does it work?
2. Use RMPrepUSB QEMU option to see if bootable under an emulator.
3. When you say it does not work on Sandy Bridge systems - do you mean that it DOES work on all other systems?
4. Use RMPrepUSB USBinfo or some other method to post the first sector of your drive so we can see it.

See also http://us.generation...-204344491.html for tips on making a bootable USB pen under linux for tricky BIOSes.

#9 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 16 August 2011 - 04:26 PM

Why don't you snapshot both the current MBR and current PBR, compress them together into a .zip file, upload the archive on a free hosting site and post a link to it?

This way we may review the result and possibly give you some advice.

3. Use RMPrepUSB USBinfo or some other method to post the first sector of your drive so we can see it.

Why bother? Wonko the Sane, you've already clearly stated what the problem is: The user is not following the Syslinux documentation and they obliterated their partition table. Pretty straight-forward.
That strike-through text is absolutely wrong. Thanks, Icecube, for correcting it. :fool:

#10 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 16 August 2011 - 04:41 PM

2. dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdb bs=512 count=1 to install the mbr in the first sector.

This doesn't overwrite the partition table in the MBr, because The Syslinux MBR (/usr/lib/syslinux/mbr.bin) is only 440 bytes. But it is not smart to use dd this way.

Using cat isn't very safe to write the MBR to the drive. It doesn't matter when the mbr.bin file is 440 bytes or less, but when it is larger, you will have problems (e.g. when you write the wrong file).

This is a lot safer (even if you selected a larger file):

2. dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdb bs=440 count=1 to install the mbr in the first sector.

The step you probably forgot, is to make the partition bootable with fdisk (toggle bootable flag with the 'a' key).
fdisk /dev/sdb


#11 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 16 August 2011 - 04:47 PM

Why bother? Wonko the Sane, you've already clearly stated what the problem is: The user is not following the Syslinux documentation and they obliterated their partition table. Pretty straight-forward.


Because I am nice guy? :dubbio:
Because it is not clear (since the OP changed "his version") what actual commands were issued? :unsure:
Because it is a 64 bit intel i7 sandy bridge architecture (which may need different installation procedure) ? ;)

@steve6375
Why do you give as acquired that OP has a Windows OS available? :whistling:

@icecube
Which is the difference between:

bs=440 count=1

and

bs=1 count=440

:frusty:


May I remind you of the OP statement :blink::

I want to make a bootable USB using syslinux 4.02/3.82 (any one) and boot kernel image on intel i7 core sandy bridge architecture. I have followed the steps below:
1. fdisk /dev/sdb and made a partition in USB which is bootable.



:cheers:
Wonko

#12 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 16 August 2011 - 04:58 PM

Which is the difference between:

bs=440 count=1


and


bs=1 count=440

The first writes 1 block of 440 bytes, while the latter writes 440 blocks of 1 byte. So the latter is not very efficient.

#13 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 16 August 2011 - 06:14 PM

The first writes 1 block of 440 bytes, while the latter writes 440 blocks of 1 byte. So the latter is not very efficient.


Good :smiling9:, so can we say - set apart a few nano/micro/milliseconds in the time needed to transer the whole amount of bytes - that the result is the same? :whistling:

:cheers:
Wonko




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users