LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Grub2 (1.96) loopback problem on usb-stick (https://www.linuxquestions.org/questions/linux-general-1/grub2-1-96-loopback-problem-on-usb-stick-753105/)

ganimo 09-06-2009 12:45 PM

Grub2 (1.96) loopback problem on usb-stick
 
Cheers Community!
Just another Guy having an unsolved Problem with Grub2 ( exactly grub 1.96, but everyone calls it "grub2")

My goal is to build the perfect multi-boot usb-stick for all situations, based on different linux-distributiones and grub2. I guessed grub2 is the best bootmanager for this project, because of the loopback-feature. Now i'm a fan of seperation, so the grub-related files are stored in one partition (sdb1) and the .iso images are in a second partition (sdb2).
In my Computer i have one sata-hard-drive with two partitions; sda1, sda2

I installed grub 2 on the usb-sticks first partition: sdb1
Code:

/boot/grub
now the first system (grml-small_2008.11.iso) is stored in sdb2 in a directory called "isos"
Code:

/isos/grml-small_2008.11.iso
here is my /boot/grub/grub.cfg:

Code:

menuentry "grml-rescue system from harddisk (ISO = grml-small_2008.11.iso)" {
  loopback loop (hd1,2)/isos/grml-small_2008.11.iso
  linux=(loop)/isos/grmlsmall/linux26 find_iso/filename=/dev/sdb2/isos/grml-small_2008.11.iso boot=live quiet vga=791
  initrd=(loop)/isos/grmlsmall/initrd.gz
gz
}

and the /boot/grub/device.map

Code:

(hd0)        /dev/sda
(hd1)        /dev/sdb

now when i boot from the usb-stick, the grub menu appears and i select the first entry. when i press ENTER, the screen flickers for less than on second and then the grub menu appears again. No error or message. nothing. i have no idea why this is caused or how to solve this.
thanks for your time to answer

linus72 09-07-2009 07:35 AM

Mmmm
cant grml boot from iso with reg grub?

also, does grub2 use root (hdx,x) still?

if so, yours is not there, why?

maybe the iso is too deep
did you try instead of puttin it in /isos
just put it right on usb?

EDIT:
also, it doesn't seem like your running persistent either..
and you should get a daily-build
as they have the newest tricks
http://daily.grml.org/

they have the newer persistent options
basically, I boot grml from both my usb's 1 is ext2/grub and other is fat32/syslinux

for persistency you make a partition on usb or make a live-rw file
and put it anywhere Except where the grml iso is
my setup is like so

sdb1 ext2 1.4gb grml-magix
sdb2 ext2 2.4gb contains 2gb persistent live-rw file

or you can label a ext2/3 partition "live-rw and it'll live there

sdb1 ext2 1.4gb grml-magix
sdb2 ext2 live-rw 2.4gb

see here
Quote:

By 'full persistence' it is meant that instead of using a tmpfs for storing modifications to the read-only media (with the copy-on-write, COW, system) a writable partition is used. In order to use this feature a partition with a clean writable supported filesystem on it labeled "live-rw" must be attached on the system at bootime and the system must be started with the boot parameter 'persistent'. This partition could be an ext2 partition on the hard disk or on a usb key created with, e.g.:

# mkfs.ext2 -L live-rw /dev/sdb1

But since live system users cannot always use a hard drive partition, and considering that most USB keys have poor write speeds, 'full' persistence could be also used with just image files, so you could create a file representing a partition and put this image file even on a NTFS partition of a foreign OS, with something like:

$ dd if=/dev/null of=live-rw bs=1G seek=1 # for a 1GB sized image file
$ /sbin/mkfs.ext2 -F live-rw

Then copy the live-rw file to a writable partition and reboot with the boot parameter 'persistent'.
thats how I roll
http://live.debian.net/manual/html/persistence.html

http://wiki.grml.org/doku.php?id=persistency

gota have grml-2009 though for that so get a daily-build, thats what Mr Procop
of GRML told me:)

aus9 09-18-2009 07:35 AM

hi

do these help?
http://www.linux.com/community/blogs...via-Grub2.html
http://www.panticz.de/MultiBootUSB

aus9 09-24-2009 08:14 PM

hi

I have booted grml iso but my grub2 is on hd and no grub2 usb stick

2) however your entry shows a gremlin gz at end of menu ....remove it pls

my link shows findiso not find_iso

3) I would like you to go back to grub2 menu boot stage and press C for commands and then type and enter.....ls

ls will show you what the (hdx,y) grub2 finds....including any fd0....if it finds hd0,x and hd1,x....hopefully your hd differs from usb and you should be able to instantly tell which is which.

4) staying at command mode I would like to share you to benefit of using TAB key to autocomplete the pathways but not to be used for isofrom or findiso

Code:

loopback loop (hd1,2)/i.....and press TAB key to autocomplete isos
if that fails you need hd0,2....assuming isos is a sub-folder on second partition

but theres more....

if usb boots normally what is fstab for this isos area?

eg /dev/sdb2 (or sda2) /isos....means you have created a structure where

/home
/isos

is a non-LHS folder created using root powers and so you drop /isos from your pathway

in other words if the mount point for second usb partition is /isos/

your pathway in grub2 speak is actually
loopback loop (hd1,2)/grml-small_2008.11.iso or
loopback loop (hd0,2)/grml-small_2008.11.iso


edit so I suspect at command mode you may succeed with

loopback loop (hd0,2)/gr......and press the tab key

aus9 10-01-2009 07:26 AM

hi

I have started...not completed a new wiki on booting isos from the hard drive...which could be adapted for usb users here

http://sidux.com/index.php?module=Wi...g=Grub2isofrom


good luck


All times are GMT -5. The time now is 12:01 AM.