Joey Boggs
2009-Jul-31 15:12 UTC
[Ovirt-devel] [PATCH node] update method used to determine boot partition for install
This will facilitate the switch to readonly rootfs. The current method will not work when symlinking /etc/mtab to /proc/mounts as the udev label /BOOT is used rather than /dev/sda1 or similar. The same output is generated and has been verified to install correctly. --- scripts/ovirt-config-boot | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/ovirt-config-boot b/scripts/ovirt-config-boot index 5e7b9f0..d5c6abb 100755 --- a/scripts/ovirt-config-boot +++ b/scripts/ovirt-config-boot @@ -31,12 +31,12 @@ ovirt_boot_setup() { log "installing the image." mount_boot # check that /boot mounted ok and find partition number for GRUB - eval $(mount|awk '$3 == "/boot" { - print "disk=" substr($1,1,length($1)-1); - print "disk2=" substr($1,1,length($1)-2); - partN=substr($1,length($1),1); partN--; - print "partN=" partN; - }') + eval $(readlink -f /dev/disk/by-label/BOOT|awk {' + print "disk=" substr($1,1,length($1)-1); + print "disk2=" substr($1,1,length($1)-2); + partN=substr($1,length($1),1); partN--; + print "partN=" partN; + '}) rc=$? if [ $rc -ne 0 -o $partN -lt 0 ]; then log "boot partition not available." -- 1.5.5.6
Alan Pevec
2009-Jul-31 19:49 UTC
[Ovirt-devel] [PATCH node] update method used to determine boot partition for install
On Fri, Jul 31, 2009 at 5:12 PM, Joey Boggs <jboggs at redhat.com> wrote:> This will facilitate the switch to readonly rootfs. The current method will > not work when symlinking /etc/mtab to /proc/mounts as the udev label /BOOT > is used rather than /dev/sda1 or similar. The same output is generated and > has been verified to install correctly. >We need this symlink even if /etc/mtab is listed in /etc/rwtab ? # check that /boot mounted ok and find partition number for GRUB> - eval $(mount|awk '$3 == "/boot" { >+ eval $(readlink -f /dev/disk/by-label/BOOT|awk {' This wouldn't check that /boot actually mounted successfully. - print "disk=" substr($1,1,length($1)-1); - print "disk2=" substr($1,1,length($1)-2); - partN=substr($1,length($1),1); partN--; - print "partN=" partN; - }') + print "disk=" substr($1,1,length($1)-1); + print "disk2=" substr($1,1,length($1)-2); + partN=substr($1,length($1),1); partN--; + print "partN=" partN; + '}) This whitespace only change obscures the real change, please put in a separate patch, but IMHO fixing indentation is not need here. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20090731/e6659397/attachment.htm>
Maybe Matching Threads
- [PATCH node][RFC] Remove dependencies on /dev/disk/by-label entries
- [PATCH node][REPOST 1/2] Fix uninstall to detect and cleanup correct partitions
- [PATCH node] iscsi remote root basework This lays most of the groundwork for iscsi installation and configuration. At this time configuring iscsi is disabled due to multiple issues with dependent pieces.
- [PATCH node] merge Root and /boot partitions
- [PATCH node] RESEND: fix iscsi installation problems