locate grub
Hi all, i am reading about USB bootable and it points me to grub in tutorial is issued command:
grub grub> find /boot/grub/stage1 but it gives me: Error 15: File not found i do not have any problems with grub, i can choose between M$ and Linux while boot so when i issue: sudo fdisk -l i see which partition is bootable (sda1) i have multiple partitons sda1, sda2, sda3, sda4 sda1 windows sda2 linux sda3 swap sda4 ntfs so my question: how can i know where is grub installed ? I found on net that is in directory /boot/grub/stage1 (sda2 in my case) but why I have bootable sda1 ?? can anyody explain that ? another question: I found grub can be installed on a partition Code:
grub> setup (hd0,0) Code:
grub> setup (hd0) last question: can i issue i think in my case command: Code:
grub> root (hd0,1) Code:
grub> find /boot/grub/stage1 realy last question: I create bootalbe usb with unetbootin which uses syslinux, is possible to boot M$ located on HDD throught that ? Thanks a lot |
Seems that i answer 2nd question
Code:
sudo dd if=/dev/sda bs=512 count=1 | od -a | grep G Code:
sudo dd if=/dev/sda1 bs=512 count=1 | od -a | grep G |
I thing I ve found solution so
/boot/grub/ contains grub files that are too big to store in MBR so they have to be located somewhere in hdd. Code:
grub> root(hd0,0) but still i would know if is possible from unetbootin created USB boot directly to harddisk partition (i dont want to press ctrl alt del) |
I hope this article can help you. There are three stages of grub. Here is a tutorial on grub that I read four or five times and still refer back to. I suggest starting at the 'Technical details' for the answers and details for your questions.
http://www.justlinux.com/forum/showt...hreadid=147959 Here is another article by the same man that is shorter http://www.justlinux.com/forum/showthread.php?t=144294 To answer your question yes you can boot usb with grub easy if usb can be booted by m/b bios. |
Thank you for reply i will check links.
I know it is possible boot from USB if mb support it but i read http://www.slax.org/forum.php?action...03#postid45603 and there are troubles using syslinux (Used by unetbootin) they recomend GRUB. So I decided to install on USB GRUB and DSL linux according to another tutorial http://www.freesoftwaremagazine.com/...tro?page=0%2C0. this boot DSL but just in very "simple" version I must do something wrong... OK what I am trying to say... When I have booted my USB with GRUB I press 'c' so i can type commands. So if syntax would be strange I am sorry I do not have grub menu now :). I wanted to to view my grub menu, so i type: Code:
grub> cat (hd1,1)/boot/grub/menu.lst Code:
/boot/vmlinuz-2.6.28-13-generic Code:
grub> kernel (hd1,1)/boot/vmlinuz-2.6.28-13-generic Code:
boot Maybe i know where I had mistake in Code:
menu.lst So I booted system normaly (without my created USB) and typed Code:
dmesg |
I have read your last post and do not understand exactly what you want. It would appear you only have a grub shell or are you operating grub from a cd?
|
1 I made my live USB vith GRUB.
2 I rebooted system with this plugged USB. 3 So after reboot I had the GRUB menu of my live USB. 4 That GRUB havent option to boot from hard disk (I did not added to menu.lst because i dont know how, if you know please help) 5 I entered to GRUB command console (press 'c') 6 I wanted to boot normaly system from HDD (as is done by GRUB on my HDD) 7 So i tried Code:
grub> kernel (hd1,1)/boot/vmlinuz-2.6.28-13-generic 9 Why system did not boot correctly ? 10 Can you advise me goot tutorial for creating USB live? 11 I wanted to add some more options (other distro, boot directly from HDD...) to unetbootin live USB but it used syslinux and found is better to use GRUB on USB do you agree with that ? |
You have not given us a copy of your fdisk -l so I will assume your usb has one partition and your grub menu.lst should be (hd1,0).
With the grub shell try the following grub> root (hd1,0) setup (hd1) exit Then in your grub menu.lst add the following title Linux root (hd1,0) chainloader +1 |
I am sorry i have not internet and now i am not in front of my PC. I post fdisk -l as soon as possible
|
I am sorry that takes a long time, early I forgot that I created this thread, so output is
sudo fdisk -l [sudo] password for marek: Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x3c2e1ae8 Device Boot Start End Blocks Id System /dev/sda1 * 1 2547 20458746 7 HPFS/NTFS /dev/sda2 8530 9623 8787555 83 Linux /dev/sda3 9624 9729 851445 82 Linux swap / Solaris /dev/sda4 2548 8529 48050415 7 HPFS/NTFS Partition table entries are not in disk order |
Did you have your usb plugged in when you ran fdisk -l? If you did your usb is not bootable.
|
I think it is relevant to point out that not all Linux has been arranged to be bootable from a USB device. A ram disk file "initrd" needs to conatin drivers for the USB to load at the right time for the kernel access but that is not univesally done by distros. Therefore many Linux distros boot but only to a panic stage if installed in a USB device. I suspect the slower speed of the USB access has something to do with it too.
Partition (hd0,0) is the first partition of the first hard disk. device (hd0) is the whole of the hard disk and that usually means the MBR. The MBR full length is actually 512 x 63 = 32256 bytes but the Bios only reads the first sector of 512 bytes. (hd0,0) starts from the end of 32256 bytes. Therefore (hd0) and (hd0,0) are physically two different locations of a hard disk. |
Quote:
|
wakatana,
The acid test is before you fire up a Linux press the "c" key and drop into a Grub prompt then type Code:
geometry (hd0) If Grub reports your (hd0) is the USB drive then you got it. Grub works on the disk order hands by the Bios. So get it from the horse's mouth! It may surprises you that being a boot loader and has no driver to read a USB port how the hell can Grub boot a USB drive? The answer is Bios forces this arrangement and not Grub. |
All times are GMT -5. The time now is 12:29 AM. |