Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upInstall grub in template's root.img #2577
Comments
marmarek
added
C: builder
C: core
C: templates
enhancement
P: major
release-notes
labels
Jan 14, 2017
marmarek
added this to the Release 4.0 milestone
Jan 14, 2017
marmarek
self-assigned this
Jan 14, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Jan 14, 2017
Member
As for grub not liking /dev/mapper/dmroot - since in TemplateVM (where grub will be installed) /dev/xvda (and /dev/xvda1) is read-write, maybe we should mount this one directly, instead of /dev/mapper/dmroot? The problem is it will not match root= parameter nor /etc/fstab (and we can't change those, as it will also affect AppVM - where dmroot should still be used). But maybe it isn't a problem?
|
As for grub not liking |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Jan 14, 2017
Member
Interesting thing - when /dev/mapper/dmroot is set using dm-linear on /dev/xvda1 (with offset 0), grub2-install fails (at least on Fedora 23). But if it's dm-linear on /dev/xvda (with offset pointing at the first partition - 2048), then it's ok. Very strange. And also dmroot setup looks much more non-obvious than before :/
|
Interesting thing - when |
added a commit
to marmarek/qubes-linux-utils
that referenced
this issue
Jan 23, 2017
added a commit
to marmarek/qubes-linux-utils
that referenced
this issue
Jan 23, 2017
added a commit
to marmarek/qubes-linux-utils
that referenced
this issue
Feb 27, 2017
added a commit
to marmarek/qubes-linux-utils
that referenced
this issue
Feb 27, 2017
added a commit
to marmarek/qubes-linux-utils
that referenced
this issue
Apr 8, 2017
added a commit
to marmarek/qubes-linux-utils
that referenced
this issue
Apr 8, 2017
qubesos-bot
referenced this issue
in QubesOS/updates-status
Apr 9, 2017
Closed
linux-utils v4.0.0 (r4.0) #32
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Jun 2, 2017
Member
In preparation for PVHv2 it may be good idea to create also GPT and ESP (/boot/efi) - http://markmail.org/message/5ycdxlta2j77ttz2
|
In preparation for PVHv2 it may be good idea to create also GPT and ESP (/boot/efi) - http://markmail.org/message/5ycdxlta2j77ttz2 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Jun 7, 2017
Member
And maybe instead of installing grub (i386) there, use UEFI to load VM-provided kernel, right now (i.e. even before real PVHv2)? This would greatly simplify VM setup, and maybe also slightly improve startup time. At the cost of slightly more complex stubdomain - need to load ovmf instead of seabios.
This approach would mean the same template layout for both pre-PVHv2 and PVHv2 templates.
|
And maybe instead of installing grub (i386) there, use UEFI to load VM-provided kernel, right now (i.e. even before real PVHv2)? This would greatly simplify VM setup, and maybe also slightly improve startup time. At the cost of slightly more complex stubdomain - need to load ovmf instead of seabios. |
marmarek commentedJan 14, 2017
This is required to boot a template (or an AppVM based on it) as HVM - #2185 .
In our current
root.imglayout there is no partition table and not enough space before filesystem start, so it's tricky to get grub working there. Technically it's possible using not-recommended "blocklist" method, but better add a partition table and move filesystem to the first partition, leaving enough space before for grub.Another issue is that grub don't like dm-linear (if not set through LVM) and fail to resolve
/dev/mapper/dmroot.A checklist:
dmrootin initramfs)/etc/default/grubto disable disk UUID usage - it's unreliable when filesystem will be visible as both/dev/xvda1(possibly read-only device) and/dev/mapper/dmroot(always read-write device - in AppVM with a CoW layer)