0

I'm quite new to the kickstart concept and I've been reading and testing this for the past few days and I'm having an issue I can't seem to find anywhere on the web right now...

At first I wanted to create a PXE boot kickstart installation, but this option requires a DHCP server, which my current network will not allow me to install, for security reasons. Hence, the DVD kickstart I want to create.

So I've been following multiple different guides, which they all look very similar, and I end up with the same results.

Here is what I've been doing:

1) Mount the current ISO

[root@olexporch01 ISO]# mount -o loop /ISO/CentOS-7-x86_64-DVD-1511.iso /media/
mount: /dev/loop0 is write-protected, mounting read-only
[root@olexporch01 ISO]# cd /media/
[root@olexporch01 media]# ls -l
total 636
-r--r--r--. 1 root root     14 Dec  9 17:35 CentOS_BuildTag
dr-xr-xr-x. 3 root root   2048 Dec  9 17:33 EFI
-r--r--r--. 1 root root    215 Dec  9 17:35 EULA
-r--r--r--. 1 root root  18009 Dec  9 17:35 GPL
dr-xr-xr-x. 3 root root   2048 Dec  9 17:33 images
dr-xr-xr-x. 2 root root   2048 Dec  9 17:33 isolinux
dr-xr-xr-x. 2 root root   2048 Dec  9 17:33 LiveOS
dr-xr-xr-x. 2 root root 612352 Dec  9 18:13 Packages
dr-xr-xr-x. 2 root root   4096 Dec  9 18:14 repodata
-r--r--r--. 1 root root   1690 Dec  9 17:35 RPM-GPG-KEY-CentOS-7
-r--r--r--. 1 root root   1690 Dec  9 17:35 RPM-GPG-KEY-CentOS-Testing-7
-r--r--r--. 1 root root   2883 Dec  9 18:14 TRANS.TBL

2) Extract the current ISO into a working folder For this, I've used 2 different command, either the simple cp -pr * from the ISO directory to the working directory or the

[root@olexporch01 /]# tar -cvf - media | (cd /bootiso/centos/ && tar -xvf - )

command. I tried both to make the the integrity of the ISO would stay (we never know)

Normally, here I would insert kickstart file and rebuild the ISO, but just for testing, I recreated the ISO with the exact same files as the original ISO

[root@olexporch01 /]# cd /bootiso/centos/media/
[root@olexporch01 media]# ls -l
total 292
-r--r--r--. 1 root root     14 Dec  9 17:35 CentOS_BuildTag
dr-xr-xr-x. 3 root root     33 Dec  9 17:33 EFI
-r--r--r--. 1 root root    215 Dec  9 17:35 EULA
-r--r--r--. 1 root root  18009 Dec  9 17:35 GPL
dr-xr-xr-x. 3 root root     54 Dec  9 17:33 images
dr-xr-xr-x. 2 root root   4096 Dec  9 17:33 isolinux
dr-xr-xr-x. 2 root root     41 Dec  9 17:33 LiveOS
dr-xr-xr-x. 2 root root 200704 Dec  9 18:13 Packages
dr-xr-xr-x. 2 root root   4096 Dec  9 18:14 repodata
-r--r--r--. 1 root root   1690 Dec  9 17:35 RPM-GPG-KEY-CentOS-7
-r--r--r--. 1 root root   1690 Dec  9 17:35 RPM-GPG-KEY-CentOS-Testing-7
-r--r--r--. 1 root root   2883 Dec  9 18:14 TRANS.TBL
[root@olexporch01 media]# mkisofs -o ../boot.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -J -R -V boot.iso .
I: -input-charset not specified, using utf-8 (detected in locale settings)
Using RPM_G000.;1 for  /RPM-GPG-KEY-CentOS-7 (RPM-GPG-KEY-CentOS-Testing-7)
Using YUM_P000.RPM;1 for  ./Packages/yum-plugin-aliases-1.1.31-34.el7.noarch.rpm (yum-plugin-changelog-1.1.31-34.el7.noarch.rpm)
Using YUM_P001.RPM;1 for  ./Packages/yum-plugin-changelog-1.1.31-34.el7.noarch.rpm (yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm)
Using YUM_P002.RPM;1 for  ./Packages/yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm (yum-plugin-tmprepo-1.1.31-34.el7.noarch.rpm)
Using YUM_P003.RPM;1 for  ./Packages/yum-plugin-tmprepo-1.1.31-34.el7.noarch.rpm (yum-plugin-verify-1.1.31-34.el7.noarch.rpm)
...
...
...
Using ABRT_005.RPM;1 for  ./Packages/abrt-gui-2.1.11-36.el7.centos.x86_64.rpm (abrt-gui-libs-2.1.11-36.el7.centos.x86_64.rpm)
Using 389_D000.RPM;1 for  ./Packages/389-ds-base-1.3.4.0-19.el7.x86_64.rpm (389-ds-base-libs-1.3.4.0-19.el7.x86_64.rpm)
Size of boot image is 4 sectors -> No emulation
  0.23% done, estimate finish Tue Feb  9 08:15:35 2016
  0.46% done, estimate finish Tue Feb  9 08:15:35 2016
  0.70% done, estimate finish Tue Feb  9 08:15:35 2016
  0.93% done, estimate finish Tue Feb  9 08:15:35 2016
  1.16% done, estimate finish Tue Feb  9 08:15:35 2016
  1.39% done, estimate finish Tue Feb  9 08:15:35 2016
  1.62% done, estimate finish Tue Feb  9 08:16:36 2016
  1.86% done, estimate finish Tue Feb  9 08:16:28 2016
  2.09% done, estimate finish Tue Feb  9 08:16:22 2016
  2.32% done, estimate finish Tue Feb  9 08:16:18 2016
...
...
...
 99.23% done, estimate finish Tue Feb  9 08:15:57 2016
 99.46% done, estimate finish Tue Feb  9 08:15:57 2016
 99.69% done, estimate finish Tue Feb  9 08:15:57 2016
 99.92% done, estimate finish Tue Feb  9 08:15:57 2016
Total translation table size: 2048
Total rockridge attributes bytes: 416616
Total directory bytes: 632832
Path table size(bytes): 140
Max brk space used 3ad000
2156686 extents written (4212 MB)
[root@olexporch01 media]# cd ..
[root@olexporch01 centos]# ls -l
total 4313376
-rw-r--r--. 1 root root 4416892928 Feb  9 08:15 boot.iso
dr-xr-xr-x. 8 root root       4096 Dec  9 18:14 media

The last ls is to make sure the ISO was created properly, but now, when I compare the original with the new one, the new one is bigger, even though I used the same files...

[root@olexporch01 centos]# diff boot.iso /ISO/CentOS-7-x86_64-DVD-1511.iso
Binary files boot.iso and /ISO/CentOS-7-x86_64-DVD-1511.iso differ
[root@olexporch01 centos]# ls -l boot.iso ; ls -l /ISO/CentOS-7-x86_64-DVD-1511.iso
-rw-r--r--. 1 root root 4416892928 Feb  9 08:15 boot.iso
-rw-------. 1 root root 4329570304 Feb  9 08:04 /ISO/CentOS-7-x86_64-DVD-1511.iso

And when I try to boot from the new ISO, which has the same files than the original, I get this error

Error message

I can't seem to find anything on this on the web except a problem that would happen with a new kernel, but I didn't compile a new kernel...

Anyone has an idea for me?

Thanks!

Marc

2 Answers2

0

So I have found what was the issue, if anyone else encounters this. Basically, all the guides I was following were all missing an argument in the mkisofs command.

Here is the actual commands:

[root@olexporch01 media]# cd /bootiso/centos/media/
[root@olexporch01 media]# mkisofs -o CentOS7.2-Base-Image.iso -b isolinux/isolinux.bin 
\-c isolinux/boot.cat -no-emul-boot -V 'CentOS 7 x86_64' 
\-boot-load-size 4 -untranslated-filenames -boot-info-table -R -J -v -T -hfs .

The "-hfs" argument is needed to make the ISO filesystem hfs. Without hfs, the ISO won't boot.

To sum up everything, here is how I created the ISO, the complete guide:

[root@olexporch01 /]# mkdir -p /bootiso/centos/media
[root@olexporch01 /]# mount /dev/cdrom /media
[root@olexporch01 /]# cd /media
[root@olexporch01 /media]# cp -pr * /bootiso/centos/media/
[root@olexporch01 /media]# cp -p /root/anaconda-ks.cfg /bootiso/centos/media/ks.cfg
[root@olexporch01 /media]# cd /bootiso/centos/media
[root@olexporch01 /media]# mkisofs -o CentOS7.2-Base-Image.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -V 'CentOS 7 x86_64' -boot-load-size 4 -untranslated-filenames -boot-info-table -R -J -v -T -hfs .

Hopes this can help someone one day! :)

0

Great instructions, but don't work for UEFI BIOS. From http://fedoraproject.org/wiki/User:Pjones/BootableCDsForBIOSAndUEFI

I added

-eltorito-alt-boot -e images/efiboot.img -no-emul-boot

before the final . on the mkisofs command to create a UEFI bootable CD.

HBruijn
  • 72,524
  • 21
  • 127
  • 192
Mark
  • 1