custom CD not working for 22.04.3

Jerry Geis jerry.geis at gmail.com
Tue Nov 28 16:26:51 UTC 2023


On Tue, Nov 28, 2023 at 11:21 AM Colin Law <clanlaw at gmail.com> wrote:

> On Tue, 28 Nov 2023 at 16:12, Jerry Geis <jerry.geis at gmail.com> wrote:
> >
> >  python3 -m livefs_edit ubuntu-22.04.3-live-server-amd64.iso test.iso
> --cp grub.cfg  /boot/grub/grub.cfg
> > running cp with arguments {'source': 'grub.cfg', 'dest':
> '/boot/grub/grub.cfg'}
> > Traceback (most recent call last):
> >   File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
> >     return _run_code(code, main_globals, None,
> >   File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
> >     exec(code, run_globals)
> >   File
> "/usr/local/lib/python3.10/dist-packages/livefs_edit/__main__.py", line 75,
> in <module>
> >     main(sys.argv[1:])
> >   File
> "/usr/local/lib/python3.10/dist-packages/livefs_edit/__main__.py", line 66,
> in main
> >     func(ctxt, **kw)
> >   File "/usr/local/lib/python3.10/dist-packages/livefs_edit/actions.py",
> line 105, in cp
> >     shutil.copy(ctxt.p(source), ctxt.p(dest))
> >   File "/usr/lib/python3.10/shutil.py", line 417, in copy
> >     copyfile(src, dst, follow_symlinks=follow_symlinks)
> >   File "/usr/lib/python3.10/shutil.py", line 254, in copyfile
> >     with open(src, 'rb') as fsrc:
> > FileNotFoundError: [Errno 2] No such file or directory:
> '/tmp/tmptffibk85/grub.cfg'
> >
> > removed the extra / and still nothing. Thanks
>
> That is a much more informative error message though.  Perhaps it will
> mean something to someone.
>
> Colin L
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users




Completely switching gears-  same topic

This is how I am trying to change the custom CDROM.

basically - mount it, copy it, place my file grub.cfg, run xorriso to
re-assemble. This does NOT boot on a NUC11 - but does boot on virt-manager.

Begin 22.04
+ rm /home/silentm/CDROM.iso/Ubuntu.22.04/Ubuntu.22.04.3.LSI.2023.11.28.iso
+ mount -t iso9660 -r -o loop
/home/silentm/CDROM.iso/Ubuntu.22.04/ubuntu-22.04.3-live-server-amd64.iso
/mnt/iso
+ DESTINATION_DIR=/home/silentm/development.systems/Ubuntu-Server.22.04
+
DESTINATION_IMAGE=/home/silentm/CDROM.iso/Ubuntu.22.04/Ubuntu.22.04.3.LSI.2023.11.28.iso
+ mkdir -p /home/silentm/development.systems/Ubuntu-Server.22.04
+ cp -arT /mnt/iso /home/silentm/development.systems/Ubuntu-Server.22.04
+ cp  ubuntu22.04.boot.grub.cfg
/home/silentm/development.systems/Ubuntu-Server.22.04/boot/grub

+ umount /mnt/iso
+ dd
if=/home/silentm/CDROM.iso/Ubuntu.22.04/ubuntu-22.04.3-live-server-amd64.iso
bs=1 count=446 of=/tmp/mbr.img
446+0 records in
446+0 records out
446 bytes copied, 0.000420468 s, 1.1 MB/s
++ fdisk -l
/home/silentm/CDROM.iso/Ubuntu.22.04/ubuntu-22.04.3-live-server-amd64.iso
++ grep EFI
++ awk '{print $2}'
+ START=4156048
++ fdisk -l
/home/silentm/CDROM.iso/Ubuntu.22.04/ubuntu-22.04.3-live-server-amd64.iso
++ grep EFI
++ awk '{print $4}'
+ COUNT=10068
+ dd
if=/home/silentm/CDROM.iso/Ubuntu.22.04/ubuntu-22.04.3-live-server-amd64.iso
bs=512 skip=4156048 count=10068 of=/tmp/efi.img
10068+0 records in
10068+0 records out
5154816 bytes (5.2 MB, 4.9 MiB) copied, 0.00905185 s, 569 MB/s
+ fdisk -l
/home/silentm/CDROM.iso/Ubuntu.22.04/ubuntu-22.04.3-live-server-amd64.iso
Disk
/home/silentm/CDROM.iso/Ubuntu.22.04/ubuntu-22.04.3-live-server-amd64.iso:
1.99 GiB, 2133391360 bytes, 4166780 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: F19CB4F2-831A-42FA-B510-0DD91B961BBF

Device
  Start     End Sectors  Size Type
/home/silentm/CDROM.iso/Ubuntu.22.04/ubuntu-22.04.3-live-server-amd64.iso1
     64 4156047 4155984    2G Microsoft basic data
/home/silentm/CDROM.iso/Ubuntu.22.04/ubuntu-22.04.3-live-server-amd64.iso2
4156048 4166115   10068  4.9M EFI System
/home/silentm/CDROM.iso/Ubuntu.22.04/ubuntu-22.04.3-live-server-amd64.iso3
4166116 4166715     600  300K Microsoft basic data
+ echo ISO dd values count=10068 skip=4156048
ISO dd values count=10068 skip=4156048
+ xorriso -as mkisofs -r --grub2-mbr /tmp/mbr.img --protective-msdos-label
-partition_cyl_align off -partition_offset 16 --mbr-force-bootable
-append_partition 2 28732ac11ff8d211ba4b00a0c93ec93b /tmp/efi.img
-appended_part_as_gpt -iso_mbr_part_type a2a0d0ebe5b9334487c068b6b72699c7
-c /boot.catalog -b /boot/grub/i386-pc/eltorito.img -no-emul-boot
-boot-load-size 4 -boot-info-table --grub2-boot-info -eltorito-alt-boot -e
--interval:appended_partition_2::: -no-emul-boot -boot-load-size 10068 -o
/home/silentm/CDROM.iso/Ubuntu.22.04/Ubuntu.22.04.3.LSI.2023.11.28.iso
/home/silentm/development.systems/Ubuntu-Server.22.04
xorriso 1.5.4 : RockRidge filesystem manipulator, libburnia project.

Drive current: -outdev
'stdio:/home/silentm/CDROM.iso/Ubuntu.22.04/Ubuntu.22.04.3.LSI.2023.11.28.iso'
Media current: stdio file, overwriteable
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, 1195g free
Added to ISO image: directory
'/'='/home/silentm/development.systems/Ubuntu-Server.22.04'
xorriso : UPDATE :     824 files added in 1 seconds
xorriso : UPDATE :     824 files added in 1 seconds
xorriso : NOTE : Copying to System Area: 446 bytes from file '/tmp/mbr.img'
xorriso : UPDATE :  14.46% done
xorriso : UPDATE :  77.71% done


ISO image produced: 1041432 sectors
Written to medium : 1041432 sectors at LBA 0
Writing to
'stdio:/home/silentm/CDROM.iso/Ubuntu.22.04/Ubuntu.22.04.3.LSI.2023.11.28.iso'
completed successfully.

+ rm -rf /home/silentm/development.systems/Ubuntu-Server.22.04

+ ln -sf Ubuntu.22.04.3.LSI.2023.11.28.iso
ubuntu-22.04.3-live-server-amd64.iso
+ ls -l /home/silentm/CDROM.iso/Ubuntu.22.04
total 4166268
-r--r--r-- 1 root         root       3155 Nov 28 08:20 grub.cfg
-rw-r--r-- 1 libvirt-qemu kvm  2133391360 Oct 24 07:50
ubuntu-22.04.3-live-server-amd64.iso
-rw-r--r-- 1 root         root 2132852736 Nov 28 11:21
Ubuntu.22.04.3.LSI.2023.11.28.iso
+ rm /tmp/efi.img
+ rm /tmp/mbr.img

THoughts ?

Jerry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20231128/e49fbf17/attachment.html>


More information about the ubuntu-users mailing list