grub: make grub-install work on virtio disks

This commit is contained in:
Alan Mizrahi 2017-05-11 18:51:38 +09:00
parent 6036779f7d
commit c32b0245e1
5 changed files with 44 additions and 21 deletions

View File

@ -12,14 +12,6 @@ drwxr-xr-x root/root sbin/
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/mbchk
drwxr-xr-x root/root usr/man/
drwxr-xr-x root/root usr/man/man1/
-rw-r--r-- root/root usr/man/man1/mbchk.1.gz
drwxr-xr-x root/root usr/man/man8/
-rw-r--r-- root/root usr/man/man8/grub-install.8.gz
-rw-r--r-- root/root usr/man/man8/grub-md5-crypt.8.gz
-rw-r--r-- root/root usr/man/man8/grub-terminfo.8.gz
-rw-r--r-- root/root usr/man/man8/grub.8.gz
drwxr-xr-x root/root usr/share/
drwxr-xr-x root/root usr/share/grub/
drwxr-xr-x root/root usr/share/grub/x86_64-unknown/
@ -36,3 +28,11 @@ drwxr-xr-x root/root usr/share/grub/x86_64-unknown/
-rw-r--r-- root/root usr/share/grub/x86_64-unknown/ufs2_stage1_5
-rw-r--r-- root/root usr/share/grub/x86_64-unknown/vstafs_stage1_5
-rw-r--r-- root/root usr/share/grub/x86_64-unknown/xfs_stage1_5
drwxr-xr-x root/root usr/share/man/
drwxr-xr-x root/root usr/share/man/man1/
-rw-r--r-- root/root usr/share/man/man1/mbchk.1.gz
drwxr-xr-x root/root usr/share/man/man8/
-rw-r--r-- root/root usr/share/man/man8/grub-install.8.gz
-rw-r--r-- root/root usr/share/man/man8/grub-md5-crypt.8.gz
-rw-r--r-- root/root usr/share/man/man8/grub-terminfo.8.gz
-rw-r--r-- root/root usr/share/man/man8/grub.8.gz

View File

@ -4,4 +4,5 @@
39e0f9a05b7e04aceb24fc7bc4893e3d ext4.patch
a1103d28cd5d28e3af261192b1517612 grub-0.97-patches-2.tar.bz2
cd3f3eb54446be6003156158d51f4884 grub-0.97.tar.gz
3183f3d5cab18c57e35628086b9658f1 grub-qemu.patch
5c2e9a78521556962fd4645dd7a99de7 menu.lst.sample

View File

@ -1,11 +1,12 @@
untrusted comment: verify with /etc/ports/opt.pub
RWSE3ohX2g5d/X3l1rbXRzvyeao4VYqkHBNKjefpCxlTwLMzIv/2VUcLgP5FvuOYyXvPT83PxLCDQYZAH2SPg8txnzws8G8xcQM=
SHA256 (Pkgfile) = 70bb80ae0773e51571290eb0c21e5dbf3ecfc532f90e0c5e27492a7f7cbdc405
SHA256 (.footprint) = ef691bdad0e6bf5de05ecb1d0d4bbad5eba338731b11fead9ea453481bb6c4d1
RWSE3ohX2g5d/c8ACuSQy/3MTX0gbaREkBv/FFF563Qi0riFeiUK7kHomaqfwGhkc7wPFAK+PaWiUfNufPUTJvd1zedjaEgBtA8=
SHA256 (Pkgfile) = 5d0e4058bff29de0753d614405938d4751ea7909b0e1e2a78e57ff60827aad5d
SHA256 (.footprint) = 81646332cfd43eb9cb86efc901acf74c353f28a923b79886aafed3d60ca16f37
SHA256 (grub-0.97.tar.gz) = 4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b
SHA256 (grub-0.97-patches-2.tar.bz2) = 8f4c3b3d347dcb3ee2bf7c562453d010cc1fb34621d2d10cb8c57b65161583b3
SHA256 (ext4.patch) = b7eb19affe0d2cf21e7a24491ad349c49cc3ddbcf27183a607ffde39dc0fde18
SHA256 (automake.patch) = 30c2e5fc8cc092af739b9a18035cabdf2edff910d2d7c3ec4912c3addb0f107b
SHA256 (ext4.patch) = b7eb19affe0d2cf21e7a24491ad349c49cc3ddbcf27183a607ffde39dc0fde18
SHA256 (grub-qemu.patch) = c23c8b1f03083f13d8be3a391354594beac286a59734fbc8247126cfc633be1d
SHA256 (crux02.xpm.gz) = 84308a83bf6138ac34874827a79d6af0330fde57d650197e55b301cc3045196d
SHA256 (crux03.xpm.gz) = 4b280bcc93ad40b01e7c1f9cf845f664954ab3c45267855ffdb40f39fd44f665
SHA256 (menu.lst.sample) = 33b480cbb2f0c2765d86c378b7ff480eb3507b4007382246ca8e28e3693dfb82

View File

@ -6,14 +6,17 @@
name=grub
version=0.97
release=7
source=(ftp://alpha.gnu.org/gnu/grub/$name-$version.tar.gz \
http://crux.nu/files/grub/0.97/$name-$version-patches-2.tar.bz2 \
ext4.patch \
automake.patch \
http://crux.nu/files/grub/common/crux02.xpm.gz \
http://crux.nu/files/grub/common/crux03.xpm.gz \
menu.lst.sample)
release=8
source=(
ftp://alpha.gnu.org/gnu/grub/$name-$version.tar.gz
http://crux.nu/files/grub/0.97/$name-$version-patches-2.tar.bz2
automake.patch
ext4.patch
grub-qemu.patch
http://crux.nu/files/grub/common/crux02.xpm.gz
http://crux.nu/files/grub/common/crux03.xpm.gz
menu.lst.sample
)
build () {
cd $name-$version
@ -33,7 +36,7 @@ build () {
./configure --prefix=/usr \
--libdir=/usr/share \
--mandir=/usr/man \
--mandir=/usr/share/man \
--sbindir=/sbin \
--disable-nls \
--disable-auto-linux-mem-opt

18
grub/grub-qemu.patch Normal file
View File

@ -0,0 +1,18 @@
diff -ru grub-0.97.orig/util/grub-install.in grub-0.97/util/grub-install.in
--- grub-0.97.orig/util/grub-install.in 2004-07-25 03:57:31.000000000 +0900
+++ grub-0.97/util/grub-install.in 2017-05-11 18:46:29.772993526 +0900
@@ -96,12 +96,12 @@
# Break the device name into the disk part and the partition part.
case "$host_os" in
linux*)
- tmp_disk=`echo "$1" | sed -e 's%\([sh]d[a-z]\)[0-9]*$%\1%' \
+ tmp_disk=`echo "$1" | sed -e 's%\([shv]d[a-z]\)[0-9]*$%\1%' \
-e 's%\(d[0-9]*\)p[0-9]*$%\1%' \
-e 's%\(fd[0-9]*\)$%\1%' \
-e 's%/part[0-9]*$%/disc%' \
-e 's%\(c[0-7]d[0-9]*\).*$%\1%'`
- tmp_part=`echo "$1" | sed -e 's%.*/[sh]d[a-z]\([0-9]*\)$%\1%' \
+ tmp_part=`echo "$1" | sed -e 's%.*/[shv]d[a-z]\([0-9]*\)$%\1%' \
-e 's%.*d[0-9]*p%%' \
-e 's%.*/fd[0-9]*$%%' \
-e 's%.*/floppy/[0-9]*$%%' \