help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

installing grub2-1.99 on usb failed


From: lode leroy
Subject: installing grub2-1.99 on usb failed
Date: Tue, 17 May 2011 13:08:20 +0200

Hello,

I'm trying to upgrade my pen-drive from grub-1.98 to grub-1.99,
but after doing grub-install, I only get the rescue mode prompt.

Can anyone enlighten me on what I'm doing wrong?


root:~# qemu -hda usbstick.img



GRUB loading.

Welcome to GRUB!



error no such device: 4c7e-12b1

Entering rescue mode...

grub rescue> ls

(hd0)

grub rescue> ls (hd0)/

error: unknown filesystem.

grub rescue> 




This is what I have done to make install grub on my pen-drive (image)

root:~# grub-install --version
grub-install (GRUB) 1.99

root:~# losetup -v /dev/loop0 usbstick.img


root:~# losetup -v /dev/loop1 usbstick.img -o `expr 62 \* 512`

Loop device is /dev/loop0
root:~# mount /dev/loop1 /mnt/stick
Loop device is /dev/loop1

root:~# grub-install --boot-directory=/mnt/stick/boot /dev/loop0

Installation finished. No error reported.
root:~# umount /mnt/stick

root:~# losetup -d /dev/loop1

root:~# losetup -d /dev/loop0                                                   
        




root:~# fdisk usbstick.img

Command (m for help): p

Disk usbstick.img: 1027 MB, 1027416576 bytes
32 heads, 62 sectors/track, 1011 cylinders, total 2006673 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xb0bcd68e

Device          Boot      Start         End      Blocks   Id  System
usbstick.img1     *          62     2005823     1002881    b  W95 FAT32

Command (m for help): q


root:~# blkid /dev/loop1
/dev/loop1: UUID="4C7E-12B1" TYPE="vfat"


root:~# fsck /dev/loop1
fsck from util-linux 2.19
dosfsck 3.0.11, 24 Dec 2010, FAT32, LFN
/dev/loop1: 287 files, 99788/250227 clusters

root:~# cat /mnt/stick/boot/grub/load.cfg

search.fs_uuid 4c7e-12b1 root
set prefix=($root)/boot/grub


                                          


reply via email to

[Prev in Thread] Current Thread [Next in Thread]