All of lore.kernel.org
 help / color / mirror / Atom feed
* Exercise: Booting from a LiveUSB ISO and contents on /dev/sda6
@ 2015-11-02  3:27 Philip Rhoades
  2015-11-02  3:56 ` Fajar A. Nugraha
  2015-11-02  5:36 ` Jordan Uggla
  0 siblings, 2 replies; 4+ messages in thread
From: Philip Rhoades @ 2015-11-02  3:27 UTC (permalink / raw)
  To: grub-devel

People,

I want to enlarge my root partition on a Fedora 23 x86_64 system and I 
know I can boot on a LiveUSB stick and use [g]parted from there to do 
what I want but I thought I would try creating a small partition with 
the ISO and its contents in it to see if I could do what I want without 
needing to use the USB stick.

The contents of /dev/sda6 is:

dr-xr-xr-x   3 root root       4096 May 22 05:03 EFI
dr-xr-xr-x   2 root root       4096 May 22 05:05 LiveOS
dr-xr-xr-x   2 root root       4096 May 22 05:03 isolinux
drwx------   2 root root      16384 Nov  2 06:08 lost+found
-r--r--r--   1 root root       2460 May 22 05:04 Fedora-Legal-README.txt
-rw-r-----   1 qemu qemu 1007681536 Oct  7 20:14 
Fedora-Live-Xfce-x86_64-22-3.iso
-r--r--r--   1 root root       1063 May 22 05:04 LICENSE


I have made a little progress but I still can't get a boot - here is the 
current state of the relevant section of my grub2.cfg (I have been 
trying various changes):

menuentry "Fedora 22 XFCE ISO Boot (x86_64 bit)" {
     insmod part_gpt
     set isoname="Fedora-Live-Xfce-x86_64-22-3"
     echo $isoname
     set isofile="${isoname}.iso"
     echo $isofile
     loopback loop (hd0,gpt6)/$isofile
     echo $loop
     linux (loop)/isolinux/vmlinuz0 root=live:CDLABEL=${isoname} 
rootfstype=auto ro rd.live.image rd.luks=0 rd.md=0 rd.dm=0 
iso-scan/filename=${isofile}
     initrd (loop)/isolinux/initrd0.img
}

During the attempted boot I see the first two "echo"s but then get 
messages that "linux" and "initrd" commands do not exist . . is it 
something simple I am missing?

Thanks,

Phil.
-- 
Philip Rhoades

PO Box 896
Cowra  NSW  2794
Australia
E-mail:  phil@pricom.com.au


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Exercise: Booting from a LiveUSB ISO and contents on /dev/sda6
  2015-11-02  3:27 Exercise: Booting from a LiveUSB ISO and contents on /dev/sda6 Philip Rhoades
@ 2015-11-02  3:56 ` Fajar A. Nugraha
  2015-11-02  5:43   ` Jordan Uggla
  2015-11-02  5:36 ` Jordan Uggla
  1 sibling, 1 reply; 4+ messages in thread
From: Fajar A. Nugraha @ 2015-11-02  3:56 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 2940 bytes --]

On Mon, Nov 2, 2015 at 10:27 AM, Philip Rhoades <phil@pricom.com.au> wrote:

> People,
>
> I want to enlarge my root partition on a Fedora 23 x86_64 system and I
> know I can boot on a LiveUSB stick and use [g]parted from there to do what
> I want but I thought I would try creating a small partition with the ISO
> and its contents in it to see if I could do what I want without needing to
> use the USB stick.
>
>
Personally I find it easier to simply have a full linux "rescue"
installation instead of using a live one. It would take less than 4GB
space, faster, and have more features compared to a live system.



> The contents of /dev/sda6 is:
>
> dr-xr-xr-x   3 root root       4096 May 22 05:03 EFI
> dr-xr-xr-x   2 root root       4096 May 22 05:05 LiveOS
> dr-xr-xr-x   2 root root       4096 May 22 05:03 isolinux
> drwx------   2 root root      16384 Nov  2 06:08 lost+found
> -r--r--r--   1 root root       2460 May 22 05:04 Fedora-Legal-README.txt
> -rw-r-----   1 qemu qemu 1007681536 Oct  7 20:14
> Fedora-Live-Xfce-x86_64-22-3.iso
> -r--r--r--   1 root root       1063 May 22 05:04 LICENSE
>
>
> I have made a little progress but I still can't get a boot - here is the
> current state of the relevant section of my grub2.cfg (I have been trying
> various changes):
>
> menuentry "Fedora 22 XFCE ISO Boot (x86_64 bit)" {
>     insmod part_gpt
>     set isoname="Fedora-Live-Xfce-x86_64-22-3"
>     echo $isoname
>     set isofile="${isoname}.iso"
>     echo $isofile
>     loopback loop (hd0,gpt6)/$isofile
>     echo $loop
>     linux (loop)/isolinux/vmlinuz0 root=live:CDLABEL=${isoname}
> rootfstype=auto ro rd.live.image rd.luks=0 rd.md=0 rd.dm=0
> iso-scan/filename=${isofile}
>     initrd (loop)/isolinux/initrd0.img
> }
>
> During the attempted boot I see the first two "echo"s but then get
> messages that "linux" and "initrd" commands do not exist . . is it
> something simple I am missing?
>
>
IIRC in the past there was a requirement where the loopfile needed to be
unfragmented? Can't remember the details though.

Anyway, you can try:
- open a grub command prompt (press "c") instead of selecting the menu, and
execute the commands manually. It should be easy-enough since there's tab
completion.
- after the "loopback loop" command, you can try typing "ls (loop" and then
press tab. It should print out what partitions grub recognize inside the
loopback file, and what FS the partition contains. If that works, you can
verify whether the paths you wrote for kernel and initrd are correct using
tab completion.

Alternatively, since you pretty much only need the kernel and initrd
anyway, just copy it to your current system (e.g. /boot/live/kernel and
/boot/live/initrd) or a directory in your /dev/sda6. It should help
filter-out any grub-loop-related problems. The kernel and initrd will only
be needed by grub during startup, and can remain safely unmounted once
you're in the live environment.

-- 
Fajar

[-- Attachment #2: Type: text/html, Size: 4086 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Exercise: Booting from a LiveUSB ISO and contents on /dev/sda6
  2015-11-02  3:27 Exercise: Booting from a LiveUSB ISO and contents on /dev/sda6 Philip Rhoades
  2015-11-02  3:56 ` Fajar A. Nugraha
@ 2015-11-02  5:36 ` Jordan Uggla
  1 sibling, 0 replies; 4+ messages in thread
From: Jordan Uggla @ 2015-11-02  5:36 UTC (permalink / raw)
  To: The development of GNU GRUB, help-grub

On Mon, Nov 2, 2015 at 3:27 AM, Philip Rhoades <phil@pricom.com.au> wrote:
> People,
>
> I want to enlarge my root partition on a Fedora 23 x86_64 system and I know
> I can boot on a LiveUSB stick and use [g]parted from there to do what I want
> but I thought I would try creating a small partition with the ISO and its
> contents in it to see if I could do what I want without needing to use the
> USB stick.

Since this is an end user support question, rather than a patch or
discussion about developing grub, it should be posted to
help-grub@gnu.org rather than grub-devel. I have CC'd helo-grub. In
your replies, please include help-grub and *remove* grub-devel from
any further replies. This problem is also actually more Fedora
specific than grub related, as explained below.

>
> The contents of /dev/sda6 is:
>
> dr-xr-xr-x   3 root root       4096 May 22 05:03 EFI
> dr-xr-xr-x   2 root root       4096 May 22 05:05 LiveOS
> dr-xr-xr-x   2 root root       4096 May 22 05:03 isolinux
> drwx------   2 root root      16384 Nov  2 06:08 lost+found
> -r--r--r--   1 root root       2460 May 22 05:04 Fedora-Legal-README.txt
> -rw-r-----   1 qemu qemu 1007681536 Oct  7 20:14
> Fedora-Live-Xfce-x86_64-22-3.iso
> -r--r--r--   1 root root       1063 May 22 05:04 LICENSE
>
>
> I have made a little progress but I still can't get a boot - here is the
> current state of the relevant section of my grub2.cfg (I have been trying
> various changes):
>
> menuentry "Fedora 22 XFCE ISO Boot (x86_64 bit)" {
>     insmod part_gpt
>     set isoname="Fedora-Live-Xfce-x86_64-22-3"
>     echo $isoname
>     set isofile="${isoname}.iso"
>     echo $isofile
>     loopback loop (hd0,gpt6)/$isofile
>     echo $loop
>     linux (loop)/isolinux/vmlinuz0 root=live:CDLABEL=${isoname}
> rootfstype=auto ro rd.live.image rd.luks=0 rd.md=0 rd.dm=0
> iso-scan/filename=${isofile}

iso-scan/filename= is a kernel parameter that Fedora does not support,
as Fedora does not support loop booting (booting from the iso file on
a filesystem rather than burned to a DVD or extracted to a hard
drive). Please file a bug report against Fedora asking them to add
such support, or extract the iso (which you have also done already),
or use a distribution that supports loop booting such as Ubuntu. For
instructions on loop booting an Ubuntu iso (or any other iso which
ships with a loopback.cfg) please see
http://www.supergrubdisk.org/wiki/Loopback.cfg#How_do_you_use_a_loopback.cfg_to_boot_an_iso.3F
.

>     initrd (loop)/isolinux/initrd0.img
> }
>
> During the attempted boot I see the first two "echo"s but then get messages
> that "linux" and "initrd" commands do not exist . . is it something simple I
> am missing?

This is a Fedora specific problem, with upstream grub you would not
have this problem. I am not very familiar with Fedora's secure boot
setup, but I suspect that is the reason that the "linux" and "initrd"
commands are not available, and that instead you need to use
"linuxefi" and "initrdefi".

>
> Thanks,
>
> Phil.
> --
> Philip Rhoades
>
> PO Box 896
> Cowra  NSW  2794
> Australia
> E-mail:  phil@pricom.com.au
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Exercise: Booting from a LiveUSB ISO and contents on /dev/sda6
  2015-11-02  3:56 ` Fajar A. Nugraha
@ 2015-11-02  5:43   ` Jordan Uggla
  0 siblings, 0 replies; 4+ messages in thread
From: Jordan Uggla @ 2015-11-02  5:43 UTC (permalink / raw)
  To: The development of GNU GRUB

On Mon, Nov 2, 2015 at 3:56 AM, Fajar A. Nugraha <list@fajar.net> wrote:
> IIRC in the past there was a requirement where the loopfile needed to be
> unfragmented? Can't remember the details though.

No such requirement exists for grub's loopback command. That was only
needed for forks of grub legacy that used "map --hook".

-- 
Jordan Uggla (Jordan_U on irc.freenode.net)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-02  5:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-02  3:27 Exercise: Booting from a LiveUSB ISO and contents on /dev/sda6 Philip Rhoades
2015-11-02  3:56 ` Fajar A. Nugraha
2015-11-02  5:43   ` Jordan Uggla
2015-11-02  5:36 ` Jordan Uggla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.