Bug 29460 - неправильно настраивается memtest86+ в случае отдельного /boot
Summary: неправильно настраивается memtest86+ в случае отдельного /boot
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: grub2 (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Michael Shigorin
QA Contact: qa-sisyphus
URL:
Keywords:
: 26179 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-10-12 12:12 MSK by Sergey Y. Afonin
Modified: 2013-11-27 00:13 MSK (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Y. Afonin 2013-10-12 12:12:18 MSK
"/boot" тут лишний, соответственно, Grub не находит memtest-4.20.bin.

### BEGIN /etc/grub.d/39_memtest ###
menuentry "Memtest86+-5.01" {
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos1)'
        search --no-floppy --fs-uuid --set=root e6486e4e-3d64-47bf-9b70-90f3552c2e02
        linux16 /boot/memtest-4.20.bin
}
### END /etc/grub.d/39_memtest ###
Comment 1 Sergey Y. Afonin 2013-10-12 12:15:02 MSK
Хотя, это же 39_memtest делает ? Тогда на grub2
Comment 2 Sergey Y. Afonin 2013-10-12 15:22:14 MSK
Как-нибудь так, может ?

--- 39_memtest.bak      2011-07-01 16:59:12.000000000 +0400
+++ 39_memtest  2013-10-12 15:16:03.492119506 +0400
@@ -48,11 +48,14 @@
   LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
 fi
 
+SEPARATED_BOOT=`mount |grep "on /boot "|wc -l`
+dirname=
+
 find /boot/ -name "memtest-*.bin" | while read memtest ; do
   prepare_boot_cache=
   echo "Found memtest image: $memtest" >&2
   basename=`basename $memtest`
-  dirname=`dirname $memtest`
+  [ $SEPARATED_BOOT == "1" ] || dirname=`dirname $memtest`
   version=`echo $basename | sed -e "s,^[^0-9]*-,,g" | sed -e "s,\.bin$,,g"`
Comment 3 Michael Shigorin 2013-10-12 15:25:12 MSK
Ну с применением /proc/mounts можно и поизящнее, но общий смысл такой, пожалуй.
Comment 4 Repository Robot 2013-10-25 19:27:03 MSK
grub2-2.00-alt15 -> sisyphus:

* Thu Oct 24 2013 Michael Shigorin <mike@altlinux> 2.00-alt15
- 39_memtest: support separate /boot properly (closes: #29460)
Comment 5 Michael Shigorin 2013-11-27 00:13:52 MSK
*** Bug 26179 has been marked as a duplicate of this bug. ***