FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Advisory Board

 
 
LinkBack Thread Tools
 
Old 05-06-2010, 10:07 PM
David Lehman
 
Default Work around device node creation issues when creating EFI images. (#589680)

My money says this is related to udev now managing the (now) symlinks
in /dev/mapper via /lib/udev/rules.d/10-dm.rules. Anyway, if this patch
makes the compose work I say ACK for f13-branch.

Dave

On Thu, 2010-05-06 at 16:02 -0400, Peter Jones wrote:
> For reasons of which I'm not quite certain, sometimes parted and such
> don't create device mapper device nodes as I'd expect. So when we think
> they should be there, run "dmsetup mknod". Also add some debug logging to
> this part of the process.
> ---
> scripts/mk-images.efi | 25 +++++++++++++++++++------
> 1 files changed, 19 insertions(+), 6 deletions(-)
>
> diff --git a/scripts/mk-images.efi b/scripts/mk-images.efi
> index 7b31ced..025f34f 100644
> --- a/scripts/mk-images.efi
> +++ b/scripts/mk-images.efi
> @@ -19,24 +19,37 @@
>
> makeefibootdisk()
> {
> - partimg=$1
> - target=$2
> + partimg=$1 && shift
> + target=$1 && shift
>
> if [ ! -f $1 ]; then
> return
> fi
>
> - local partsize=$(ls -l $1 | awk '{ print $5; }')
> + local partsize=$(/bin/ls -l $partimg | awk '{ print $5; }')
> local disksize=$((17408 + $partsize + 17408))
> disksize=$(($disksize + $(($disksize % 512))))
> local diskimg=$(mktemp /tmp/efidisk.img.XXXXXX)
> dd if=/dev/zero of=$diskimg count=1 bs=$disksize
> + MAKEDEV /dev/loop
> local loop=$(losetup -v -f $diskimg | awk '{ print $4 }')
> + echo "loop is $loop"
> + ls -l $loop
> dmsetup create efiboot$$ --table "0 $(($disksize / 512)) linear $loop 0"
> + dmsetup mknodes efiboot$$
> + echo "efiboot$$ should exist"
> + ls -l /dev/mapper/efiboot$$*
> parted --script /dev/mapper/efiboot$$ mklabel gpt unit b mkpart '"EFI System Partition"' fat32 17408 $((17408 + $partsize)) set 1 boot on
> + dmsetup mknodes efiboot$$p1 || :
> + echo "efiboot$$p1 should exist"
> + ls -l /dev/mapper/efiboot$$*
> + dmsetup ls
> + dmsetup table
> dd if=$partimg of=/dev/mapper/efiboot$$p1
> - dmsetup remove /dev/mapper/efiboot$$p1
> - dmsetup remove /dev/mapper/efiboot$$
> + echo "dd-ing $partimg to /dev/mapper/efiboot$$p1"
> + # the next two lines seem to depend on the exact version of parted :/
> + dmsetup remove -f /dev/mapper/efiboot$$p1 || :
> + dmsetup remove -f /dev/mapper/efiboot$$
> losetup -d $loop
>
> mv -v $diskimg $target
> @@ -127,7 +140,7 @@ prepareEfiImage() {
> # dynamically calculate the size of the dosfs
> BOOTDISKSIZE=$(du -kcs $MBD_BOOTTREE_TMP | tail -n1 | awk '{print $1}')
> BOOTDISKSIZE=$(expr $BOOTDISKSIZE + 100)
> - echo "The size of the efiboot.img dosfs is $BOOTDISKSIZE"
> + echo "The size of the efiboot.img dosfs is ${BOOTDISKSIZE}k"
> mkdosfs -n ANACONDA -C $MBD_FILENAME $BOOTDISKSIZE >/dev/null
> mount -o loop,shortname=winnt,umask=0077 -t vfat $MBD_FILENAME $MBD_BOOTTREE
> cp -R $MBD_BOOTTREE_TMP/* $MBD_BOOTTREE


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 05-07-2010, 02:51 AM
Jesse Keating
 
Default Work around device node creation issues when creating EFI images. (#589680)

On Thu, 2010-05-06 at 17:07 -0500, David Lehman wrote:
>
> My money says this is related to udev now managing the (now) symlinks
> in /dev/mapper via /lib/udev/rules.d/10-dm.rules. Anyway, if this patch
> makes the compose work I say ACK for f13-branch.

Since I think pjones is done for the night, I git am'd this and cherry
picked it over to the f13-branch so that it can get into the next build
(hopefully tonight)

--
Jesse Keating
Fedora -- Freedom˛ is a feature!
identi.ca: http://identi.ca/jkeating
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 12:48 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org