bugGNU GRUB - Bugs: bug #32426, Can not boot grub from MBR on...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #32426: Can not boot grub from MBR on ISO9660 filesystem

Submitted by:  Коренберг Марк <socketpair>
Submitted on:  Fri 11 Feb 2011 03:41:58 PM UTC  
 
Category: BootingSeverity: Major
Priority: 5 - NormalItem Group: Software Error
Status: InvalidPrivacy: Public
Assigned to: NoneOriginator Name: Коренберг Марк
Open/Closed: ClosedRelease: 
Release: 1.98Reproducibility: Every Time
Planned Release: None

(Jump to the original submission Jump to the original submission)

Sun 13 Feb 2011 09:48:51 AM UTC, comment #6:

First of all:
-----8<---------
Reserved Field - The first 16 sectors of the track is reserved. The reserved field can be used to store computer code to boot the operating system. This makes the CD bootable. But most of the time, the reserved field is empty, containing zeros.
-----8<---------

16 sectors is the 32768 bytes. My ubuntu core.img is 23817 bytes. So it fits in that size.

Second:
Why not to change core.img file contents ? I don't think it's size is changed during installation.

Коренберг Марк <socketpair>
Sun 13 Feb 2011 08:56:43 AM UTC, comment #5:

Actually you didn't understand the install process. boot.img contains only reference to first sector of core.img. Rest of blocklist is in core.img. So embeddingless installs to read-only filesystems aren't supported. It's not a bug but simply something which isn't supported. ISO9660 reserves only 16K. Not enough for embedding. So the only way such install is supported is through grub-mkrescue and frankly I don't see the point of supporting any other way of iso9660 install. Feel free to supply the reason to change my opinion on the later.

Vladimir Serbinenko <phcoder>
Project Administrator
Sun 13 Feb 2011 06:52:52 AM UTC, comment #4:

Well, I think You did not understand me...
I want GRUB to embed stage1 into first 512 bytes of .iso image in a way that it loads core.img by sector numbers.

I know, that ISO image reserve many sectors at the beginning, so we can overwrite first sector safely. Now, I use manual embedding:

cat /usr/lib/grub/i386-pc/boot.img core.img | dd of=iso.iso conv=notrunc

It works, but it's not true way of installing GRUB. I want:
1. to install GRUB using grub-setup
2. boot sector to refer to core.img stored somewhere in ISO image, and not just after first sector.

Also, I understand why GRUB can not install to squashfs. squashfs does not reserve any space where GRUB can be embedded, and squashfs is true read-only FS.
ISO9660 have plenty of space to embed GRUB.

Коренберг Марк <socketpair>
Sat 12 Feb 2011 09:56:20 PM UTC, comment #3:

grub-setup requires read-write support. That's why it requires a special handling and that's why there is a separate script for it. The only other similar case would be the squashfs. Currently GRUB2-experimental can read from squashfs but not install on it.
grub-mkrescue requires few additional xorriso features, so you need it installed. But it shouldn't be any problem to have xorriso alongside any mkisofs or genisoimage.

Vladimir Serbinenko <phcoder>
Project Administrator
Sat 12 Feb 2011 08:17:57 PM UTC, comment #2:

Okay, that command uses xorriso.
How to deal with mkisofs (genisoimage)?
1. Why GRUB can not imstall into image correctly ?
2. Why GRUB can not install into image with ISO9660 ?

I think it's a bug in GRUB

(Владимир, если не сложно, продублируй по-русски :) )

Коренберг Марк <socketpair>
Fri 11 Feb 2011 08:47:29 PM UTC, comment #1:

Please use the official grub-mkrescue for this purpose.

Vladimir Serbinenko <phcoder>
Project Administrator
Fri 11 Feb 2011 03:41:58 PM UTC, original submission:

I attached example script that makes dual-boot .iso image. I mean that it bootable either via eltorito boot process, or as hard disk.

Botting as el-torito works perfectly. But booting the same image from HDD fail.

How I test that?

$ kvm -cdrom cd.iso # works OK
$ kvm -hda cd.iso # FAIL

One of the problems is invalid path resolution. see ln command in script.

Second problem - during booting as HDD it thang somewhere at startup.

How I can debug problem ?

Коренберг Марк <socketpair>

 

Attached Files
file #22651:  qwe.sh added by socketpair (1KiB - application/x-shellscript)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by phcoder (Posted a comment)
  • -unavailable- added by socketpair (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 11 Feb 2011 08:47:29 PM UTCphcoderStatusNone=>Invalid
      Open/ClosedOpen=>Closed
    Fri 11 Feb 2011 03:41:58 PM UTCsocketpairAttached File-=>Added qwe.sh, #22651

    Back to the top


    Powered by Savane 3.1-cleanup1