Skip to content

Commit 748b4d3

Browse files
committed
feat: install open source memtest86+ v7.00
1 parent d8f50f5 commit 748b4d3

File tree

2 files changed

+29
-56
lines changed

2 files changed

+29
-56
lines changed

README.md

Lines changed: 22 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ From this point we will be configuring the `live system`.
196196
grub2-common \
197197
grub-efi-amd64-signed \
198198
shim-signed \
199-
memtest86+ \
200199
mtools \
201200
binutils
202201
```
@@ -380,24 +379,13 @@ We are now back in our `build environment` after setting up our `live system` an
380379
cp /boot/initrd.img-**-**-generic /image/casper/initrd
381380
```
382381
383-
3. Copy memtest86+ binary (BIOS)
382+
3. Copy memtest86+ binary (BIOS and UEFI)
384383
385384
```shell
386-
if [ -f "/boot/memtest86+x64.bin" ];
387-
cp /boot/memtest86+x64.bin /image/install/memtest86+
388-
else
389-
cp /boot/memtest86+.bin /image/install/memtest86+
390-
fi
391-
```
392-
393-
4. Download and extract memtest86 binary (UEFI)
394-
395-
```shell
396-
wget --progress=dot https://www.memtest86.com/downloads/memtest86-usb.zip -O /image/install/memtest86-usb.zip
397-
398-
unzip -p /image/install/memtest86-usb.zip memtest86-usb.img > /image/install/memtest86
399-
400-
rm -f /image/install/memtest86-usb.zip
385+
wget --progress=dot https://memtest.org/download/v7.00/mt86plus_7.00.binaries.zip -O install/memtest86.zip
386+
unzip -p install/memtest86.zip memtest64.bin > install/memtest86+.bin
387+
unzip -p install/memtest86.zip memtest64.efi > install/memtest86+.efi
388+
rm -f install/memtest86.zip
401389
```
402390
403391
## GRUB menu configuration
@@ -414,43 +402,39 @@ We are now back in our `build environment` after setting up our `live system` an
414402
cat <<EOF > /image/isolinux/grub.cfg
415403
416404
search --set=root --file /ubuntu
417-
405+
418406
insmod all_video
419-
407+
420408
set default="0"
421409
set timeout=30
422-
410+
423411
menuentry "Try Ubuntu FS without installing" {
424-
linux /casper/vmlinuz boot=casper nopersistent toram quiet splash ---
425-
initrd /casper/initrd
412+
linux /casper/vmlinuz boot=casper nopersistent toram quiet splash ---
413+
initrd /casper/initrd
426414
}
427-
415+
428416
menuentry "Install Ubuntu FS" {
429-
linux /casper/vmlinuz boot=casper only-ubiquity quiet splash ---
430-
initrd /casper/initrd
417+
linux /casper/vmlinuz boot=casper only-ubiquity quiet splash ---
418+
initrd /casper/initrd
431419
}
432-
420+
433421
menuentry "Check disc for defects" {
434-
linux /casper/vmlinuz boot=casper integrity-check quiet splash ---
435-
initrd /casper/initrd
422+
linux /casper/vmlinuz boot=casper integrity-check quiet splash ---
423+
initrd /casper/initrd
436424
}
437-
425+
438426
grub_platform
439427
if [ "\$grub_platform" = "efi" ]; then
440428
menuentry 'UEFI Firmware Settings' {
441-
fwsetup
429+
fwsetup
442430
}
443-
444-
menuentry "Test memory Memtest86 (UEFI, long load time)" {
445-
insmod part_gpt
446-
insmod search_fs_uuid
447-
insmod chain
448-
loopback loop /install/memtest86
449-
chainloader (loop,gpt1)/efi/boot/BOOTX64.efi
431+
432+
menuentry "Test memory Memtest86+ (UEFI)" {
433+
linux /install/memtest86+.efi
450434
}
451435
else
452436
menuentry "Test memory Memtest86+ (BIOS)" {
453-
linux16 /install/memtest86+
437+
linux16 /install/memtest86+.bin
454438
}
455439
fi
456440
EOF

scripts/chroot_build.sh

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ function install_pkg() {
117117
grub2-common \
118118
grub-efi-amd64-signed \
119119
shim-signed \
120-
memtest86+ \
121120
mtools \
122121
binutils
123122

@@ -180,16 +179,10 @@ function build_image() {
180179
cp /boot/initrd.img-**-**-generic casper/initrd
181180

182181
# memtest86
183-
if [ -f "/boot/memtest86+x64.bin" ]; then
184-
cp /boot/memtest86+x64.bin install/memtest86+
185-
else
186-
cp /boot/memtest86+.bin install/memtest86+
187-
fi
188-
189-
# memtest86++
190-
wget --progress=dot https://www.memtest86.com/downloads/memtest86-usb.zip -O install/memtest86-usb.zip
191-
unzip -p install/memtest86-usb.zip memtest86-usb.img > install/memtest86
192-
rm -f install/memtest86-usb.zip
182+
wget --progress=dot https://memtest.org/download/v7.00/mt86plus_7.00.binaries.zip -O install/memtest86.zip
183+
unzip -p install/memtest86.zip memtest64.bin > install/memtest86+.bin
184+
unzip -p install/memtest86.zip memtest64.efi > install/memtest86+.efi
185+
rm -f install/memtest86.zip
193186

194187
# grub
195188
touch ubuntu
@@ -223,16 +216,12 @@ menuentry 'UEFI Firmware Settings' {
223216
fwsetup
224217
}
225218
226-
menuentry "Test memory Memtest86 (UEFI, long load time)" {
227-
insmod part_gpt
228-
insmod search_fs_uuid
229-
insmod chain
230-
loopback loop /install/memtest86
231-
chainloader (loop,gpt1)/efi/boot/BOOTX64.efi
219+
menuentry "Test memory Memtest86+ (UEFI)" {
220+
linux /install/memtest86+.efi
232221
}
233222
else
234223
menuentry "Test memory Memtest86+ (BIOS)" {
235-
linux16 /install/memtest86+
224+
linux16 /install/memtest86+.bin
236225
}
237226
fi
238227
EOF

0 commit comments

Comments
 (0)