PDA

View Full Version : [SOLVED] Custom Fedora 26 iso has no wifi drivers



donatom
24th September 2017, 10:08 PM
I have created a custom Fedora 26 xfce iso. When I boot it from a multiboot usb thumb drive with mbr boot, there is no wifi (drivers are missing). If I try to load rt2800usb (wifi driver) with modprobe an error is thrown stating that that module cannot be found from among the kernel modules.

I can use the same iso, however, in a multiboot efi boot drive with no problem - the drivers have been loaded and Network Manager has a list of possible wifi access points.

Notably, if I burn the same custom iso to a usb drive using dd (following fedora wiki instructions), wifi is loaded and works fine (on mbr systems).

I have played around with the grub2 menuentry without success.

Here is one of the menuentries:


menuentry "Fedora-Custom26+" {
search --no-floppy --fs-uuid --set=root 03a95642-a33a-48b7-91f1-51e9dec33b2d
set isofile="/Fedora-Custom/Fedora-Custom.iso"
loopback loop $isofile
set root=loop
linux /isolinux/vmlinuz root=live:LABEL=LIVE iso-scan/filename=$isofile rd.live.image quiet
initrd /isolinux/initrd.img
}

Here is another menuentry (I only use "LiveOS, isolinux, initrd.img and vmlinux" that I extracted from the iso):


menuentry "Fedora-Custom" {
#set isoname="Fedora-Custom.iso"
#set isofile="(hd0,msdos1)/Fedora-Custom/Fedora-Custom.iso"
#echo "Using ${isoname} . . . "
#loopback loop $isofile
#linux (loop)/isolinux/vmlinuz initrd=initrd.img root=live:LABEL=LIVE iso-scan/filename=$isofile rd.live.image quiet
#initrd (loop)/isolinux/initrd.img
linux /Fedora-Custom/isolinux/vmlinuz initrd=initrd.img root=live:LABEL=LIVE rhgb rd.luks=0 rd.md=0 rd.dm=0 nomodeset rd.live.image quiet
initrd /Fedora-Custom/isolinux/initrd.img
}

Both methods are able to boot the iso successfully (mbr system missing wifi drivers, etc.)

I would appreciated any suggestions you may have.

donatom
29th September 2017, 06:02 AM
I have found that when I make a hybrid efi/mbr usb thumb drive, wifi works on both systems: efi as well as mbr. So my work-around is to forget about mbr usb drives and only rely on multiboot usb drives that can boot on any system (efi or mbr).

By the way, I followed the Archlinux multiboot usb wiki when creating the hybrid device. When installing the grub for mbr and the grub for efi, I had to include the option "--force", otherwise, the grub-install command threw an error and refused to install the program. It could be that the first partition (protected mbr partition) was too small; the next time I will make the first partition 50 megabytes in size instead of 1 megabyte which the wiki recommended.

Here is the web-page:
https://wiki.archlinux.org/index.php/Multiboot_USB_drive

This is only a work-around, albeit a very good one, not a solution so I won't mark this problem solved, at least not yet.

amiga
30th September 2017, 08:31 PM
I have created a custom Fedora 26 xfce iso. When I boot it from a multiboot usb thumb drive with mbr boot, there is no wifi (drivers are missing). If I try to load rt2800usb (wifi driver) with modprobe an error is thrown stating that that module cannot be found from among the kernel modules.


Can you find the module with locate or find when booted into the iso environment ?


$ locate rt2800usb
/usr/lib/modules/3.10.0-327.22.2.el7.x86_64/kernel/drivers/net/wireless/rt2x00/rt2800usb.ko
$ modinfo rt2800usb
filename: /lib/modules/3.10.0-514.2.2.el7.x86_64/kernel/drivers/net/wireless/ralink/rt2x00/rt2800usb.ko
license: GPL
firmware: rt2870.bin
description: Ralink RT2800 USB Wireless LAN driver.
version: 2.3.0

If you can find them you can try insmod with the full path instead of modprobe. Also check the running kernel version with uname -r.


Notably, if I burn the same custom iso to a usb drive using dd (following fedora wiki instructions), wifi is loaded and works fine (on mbr systems).

This means that the .ko module is in the iso as it should be.

donatom
1st October 2017, 12:01 AM
Hi amiga. Thanks for your reply.

According to uname I am running kernel 4.12.14-300.fc26.x86_64, but when I try to locate the wifi driver (or any other driver for that matter) the only kernel available is 4.11.11-300.fc26.x86_64.

Here is what I find when I try to locate rt2800usb:


/usr/src/kernels/4.11.11-300.fc26.x86_64/include/config/rt2800usb/
rt33xx.h rt3573.h rt35xx.h rt53xx.h rt55xx.h unknown.h

I tried to load the rt2800 driver but there is obviously no such driver.

Here is the result of the insmod command:

insmod /usr/src/kernels/4.11.11-300.fc26.x86_64/include/config/rt2800usb
insmod: ERROR: could not insert module /usr/src/kernels/4.11.11-300.fc26.x86_64/include/config/rt2800usb: Is a directory


I tried to load "unkown.h" and others in the rt2800usb directory but insmod throws and error saying "Invalid parameters" since none of them is a driver.

donatom
1st October 2017, 01:38 AM
I tried to use your path without the locate command and found the rt2800usb driver, but there are two problems. One which I mentioned before is that the driver is not for the current kernel. The second is that the kernel is zipped (it ends in xz). In any case, I tried to load it and, not surprisingly, it would not load.

The insmod command throws the "Invalid module format" error.

I could unzip the driver but it very likely will not load since it is for a different kernel.

Thanks for your help. If you have any other ideas, please let me know.

donatom
1st October 2017, 01:53 AM
I would like to give a little more background about this problem. I have been making custom isos using livecd-creator and livemedia-creator for several years and I have never before had problems with wifi drivers.

Recently I have run into mock problems so I now roll custom isos in a VM using the livemedia-creator command.

I have also recently run into a problem not being able to use the iso to install to another hard drive. I believe both problems are due to recent changes in lorax and anaconda. I have submitted bug reports (one was declared a duplicate) but as far as I know the bugs persist.

Since there are work-arounds for this wifi problem in my isos, I don't think I will sublit another bug report.

amiga
1st October 2017, 04:31 AM
According to uname I am running kernel 4.12.14-300.fc26.x86_64, but when I try to locate the wifi driver (or any other driver for that matter) the only kernel available is 4.11.11-300.fc26.x86_64.

This is very strange, should not occur, and is the source of your problems. This is not a wifi problem at all as this will affect all kernel modules. The wifi module was just the first symptom.

Needless to say an OS iso should have a kernel and kernel modules that are of the same version.

You need to explain what you mean by "I am running kernel 4.12.14-300.fc26.x86_64" ? Did you type uname -r after booting up with this iso ?

You need to look inside the iso to find the kernel version and that of the modules. For example for Fedora 23 Cinnamon Live :


$ sudo mount -o loop Fedora-Live-Cinnamon-x86_64-23-10.iso /mnt/iso
mount: /dev/loop0 is write-protected, mounting read-only
$ cd /mnt/iso
[ iso]
$ ls
EFI Fedora-Legal-README.txt isolinux LICENSE LiveOS
$ cd isolinux/
$ file vmlinuz0
vmlinuz0: Linux kernel x86 boot executable bzImage, version 4.2.3-300.fc23.x86_64 (mockbuild@bkernel02.phx2.fedoraproject.o, RO-rootFS, swap_dev 0x5, Normal VGA

$ cd ../LiveOS
$ sudo mount squashfs.img -t squashfs -o loop /mnt/squashfs/
$ sudo mount -o loop /mnt/squashfs/LiveOS/ext3fs.img /mnt/rootfs
$ cd /mnt/rootfs/
[ rootfs]
$ ls
bin boot dev etc home lib lib64 lost+found media mnt opt proc root run sbin srv sys tmp usr var

$ cd usr/lib/modules
[ modules]
11:12 PM $ ls
4.2.3-300.fc23.x86_64

As can be seen the kernel version in the iso matches the directory in /usr/lib/modules.

If you are somehow running a different kernel when booted into fhis iso than that stored in the iso then something is very wrong.


Here is the result of the insmod command:

You can't run this unless you found a kernel object .ko. It doesn't work with any other files.

donatom
1st October 2017, 06:49 AM
You need to explain what you mean by "I am running kernel 4.12.14-300.fc26.x86_64" ? Did you type uname -r after booting up with this iso ?

Yes, when I run uname -r that is the kernel that is identified after booting up the iso on a mbr system.

I have tried "to look inside of the custom iso" but I cannot mount the squashfs.img. Here is the error that I get:
(I made the /mnt/squashfs with mkdir first):

[root@archlinux Desktop]# mount -o loop Fedora-Custom.iso /mnt
mount: /mnt: WARNING: device write-protected, mounted read-only.
[root@archlinux Desktop]# cd /mnt
[root@archlinux mnt]# ls
EFI images isolinux LiveOS
[root@archlinux mnt]# cd isolinux/
[root@archlinux isolinux]# file vmlinuz
vmlinuz: Linux kernel x86 boot executable bzImage, version 4.12.14-300.fc26.x86_64 (mockbuild@bkernel02.phx2.fedoraproject.org) #1 SMP Wed Sep 20 16:28:07, RO-rootFS, swap_dev 0x7, Normal VGA
[root@archlinux isolinux]#
[root@archlinux isolinux]# cd ../LiveOS/
[root@archlinux LiveOS]# mount squashfs.img -t squashfs -o loop /mnt/squashfs
mount: /mnt/squashfs: mount point does not exist.

In any case as I said initially, this problem only exists when I boot onto a mbr system using an mbr usb thumb drive. When I use a hybrid usb drive or an efi usb drive, the rt2800usb driver is loaded and wifi works. I am at a loss to explain why this could happen. Again I am using the exact same custom iso on each usb thumb drive (cloned of course).

Thanks again for your help.

pingwu
1st October 2017, 08:37 AM
Thanks for your report.

I am curious, where can we find the most up-to-date tutorials re creating custom Fedora iso? Thanks again!

amiga
1st October 2017, 09:28 AM
You are making a big error on your very first line by mounting directly on /mnt. This is bad 1990's practice. I used /mnt/iso to mount the iso itself. Mounting on /mnt directly hides all of the /mnt sub-directories that you create.


I have tried "to look inside of the custom iso" but I cannot mount the squashfs.img. Here is the error that I get:
(I made the /mnt/squashfs with mkdir first):

You also need to create and use /mnt/iso and /mnt/rootfs.

/mnt/iso - mountpoint for iso itself
/mnt/squashfs - mountpoint for squashfs.img compressed file system
/mnt/rootfs - mountpoint for ext3 root filesystem inside squashfs.img

As you are using subdirectories of /mnt you can never mount on /mnt directly as you were doing.

donatom
1st October 2017, 06:21 PM
amiga, thanks for your explanation of the proper way to mount images inside of other images.

Here are the results:


[root@fedora Desktop]# cd /mnt/iso/
[root@fedora iso]# ls
EFI images isolinux LiveOS
[root@fedora iso]# cd isolinux/
[root@fedora isolinux]# file vmlinuz
vmlinuz: Linux kernel x86 boot executable bzImage, version 4.12.14-300.fc26.x86_64 (mockbuild@bkernel02.phx2.fedoraproject.org) #1 SMP Wed Sep 20 16:28:07, RO-rootFS, swap_dev 0x7, Normal VGA
[root@fedora isolinux]# cd ../LiveOS/
[root@fedora LiveOS]# mount squashfs.img -t squashfs -o loop /mnt/squashfs/
[root@fedora LiveOS]# mount -o loop /mnt/squashfs/LiveOS/rootfs.img /mnt/rootfs/
[root@fedora LiveOS]# cd /mnt/rootfs/
[root@fedora rootfs]# ls
bin dev home lib64 media opt root sbin sys usr
boot etc lib lost+found mnt proc run srv tmp var
[root@fedora rootfs]# cd usr/lib/modules
[root@fedora modules]# ls
4.12.14-300.fc26.x86_64


There doesn't seem to be a problem with the modules matching up with the kernel.

I continue to have a feeling that the drivers problem (among others) is the result of changes and/or bugs in lorax-livemedia-creator and anaconda. According to bugzilla fedora programmers have fixed anaconda but the fixed version will only be available when Fedora 27 comes out (or in Rawhide).

donatom
2nd October 2017, 12:40 AM
I am curious, where can we find the most up-to-date tutorials re creating custom Fedora iso? Thanks again!

I believe that this is the most up-to-date web-site (I don't believe mock has been fixed yet, so use livemedia-creator in a vm of the most up-to-date live Fedora iso:

https://rhinstaller.github.io/lorax/livemedia-creator.html]

This might also be of help:

https://forums.fedoraforum.org/showthread.php?t=313683

amiga
3rd October 2017, 04:59 AM
There doesn't seem to be a problem with the modules matching up with the kernel.

Even though I didn't show all of the steps did you double check that the rt2800usb.ko module is in this directory at kernel/drivers/net/wireless/rt2x00/rt2800usb.ko ?

This begs the question as to how you looked for drivers previously.


According to uname I am running kernel 4.12.14-300.fc26.x86_64, but when I try to locate the wifi driver (or any other driver for that matter) the only kernel available is 4.11.11-300.fc26.x86_64.

Here is what I find when I try to locate rt2800usb:

/usr/src/kernels/4.11.11-300.fc26.x86_64/include/config/rt2800usb/
rt33xx.h rt3573.h rt35xx.h rt53xx.h rt55xx.h unknown.h

When you were booted into this iso what command did you use when you found the above ? Also live distributions typically don't have /usr/src/kernels/ directories. You apparently found kernel sources for a different kernel than the live cd uses.

If you booted into this iso again with the multiboot usb mbr can you navigate to the driver directory
/usr/lib/modules/4.12.14-300.fc26.x86_64/kernel/drivers/net/wireless/rt2x00/rt2800usb.ko ? Try this.

donatom
3rd October 2017, 07:28 AM
When you were booted into this iso what command did you use when you found the above ?

I used locate and tab completion (after a "updatedb" command to look for rt2800usb:


[root@localhost-live Desktop]# locate rt2800usb
/usr/lib/modules/4.11.11-300.fc26.x86_64/kernel/drivers/net/wireless/ralink/rt2x00/rt2800usb.ko.xz
/usr/src/kernels/4.11.11-300.fc26.x86_64/include/config/rt2800usb
/usr/src/kernels/4.11.11-300.fc26.x86_64/include/config/rt2800usb.h
/usr/src/kernels/4.11.11-300.fc26.x86_64/include/config/rt2800usb/rt33xx.h
/usr/src/kernels/4.11.11-300.fc26.x86_64/include/config/rt2800usb/rt3573.h
/usr/src/kernels/4.11.11-300.fc26.x86_64/include/config/rt2800usb/rt35xx.h
/usr/src/kernels/4.11.11-300.fc26.x86_64/include/config/rt2800usb/rt53xx.h
/usr/src/kernels/4.11.11-300.fc26.x86_64/include/config/rt2800usb/rt55xx.h
/usr/src/kernels/4.11.11-300.fc26.x86_64/include/config/rt2800usb/unknown.h

You can see rt33xx.h, rt3573.h, etc at the end of the paths.


If you booted into this iso again with the multiboot usb mbr can you navigate to the driver directory
/usr/lib/modules/4.12.14-300.fc26.x86_64/kernel/drivers/net/wireless/rt2x00/rt2800usb.ko ?

No, the only rt2800usb driver is for an older kernel (and the path begins with /usr/src/kernels/4.11.11-300.fc26.x86_64 (as seen above). the path "/usr/lib/modules/4.12.14-300.fc26.x86_64/ . . . " does not exist when booted into an mbr system.

amiga
3rd October 2017, 06:04 PM
No, the only rt2800usb driver is for an older kernel (and the path begins with /usr/src/kernels/4.11.11-300.fc26.x86_64 (as seen above). the path "/usr/lib/modules/4.12.14-300.fc26.x86_64/ . . . " does not exist when booted into an mbr system.

There could be a very simple explanation for what is happening. Apparently the wrong root filesystem is being mounted due to duplicate labels. In your original post you described the grub stanzas used.


menuentry "Fedora-Custom26+" {
search --no-floppy --fs-uuid --set=root 03a95642-a33a-48b7-91f1-51e9dec33b2d
set isofile="/Fedora-Custom/Fedora-Custom.iso"
loopback loop $isofile
set root=loop
linux /isolinux/vmlinuz root=live:LABEL=LIVE iso-scan/filename=$isofile rd.live.image quiet
initrd /isolinux/initrd.img
}

In the first line you use --fs-uuid to find the unique partition on which the iso file resides. However when mounting the root filesystem you use the label root=live:LABEL=LIVE which may not be unique if you have more than one OS iso in this partition. All of your isos could have the same label. You can only use labels if they are unique, otherwise use unique UUIDs everywhere.

You said this was a multi-boot usb drive. You only showed the Fedora 26 grub stanza. Are there other iso files that possibly have the same :LABEL=LIVE label ? What seems to be happening is that this stanza is running the 4.12 kernel but is finding a different 4.11 file system when it searches for the label. If you used unique UUIDs everywhere this wouldn't happen. Or you could find a unique label for the Fedora 26 iso instead of the generic LABEL=LIVE.

To check this you need to check the release string. For Fedora it should be /etc/redhat-release


$ cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

If you don't get Fedora 26 then you have the wrong root file system mounted.

To solve this problem you need to use unique UUIDs everywhere or find a unique label. For UUIDs you would use root=UUID=XXXXXXX in the linux /isolinux/vmlinuz line where XXXXXXX is the UUID of your iso file system.

To find out this UUID you could mount it again as you have already done.


$ sudo mount -o loop Fedora-Live-Cinnamon-x86_64-23-10.iso /mnt/iso
mount: /dev/loop0 is write-protected, mounting read-only
$ sudo blkid /dev/loop0
/dev/loop0: UUID="2015-10-29-21-40-09-00" LABEL="Fedora-Live-Cinnamon-x86_64-23-1" TYPE="iso9660" PTTYPE="dos"
$ cd /dev/disk/by-uuid/
$ ll | grep loop0
lrwxrwxrwx 1 root root 11 Oct 3 13:12 2015-10-29-21-40-09-00 -> ../../loop0
$ cd /dev/disk/by-label/
$ ll | grep loop0
lrwxrwxrwx 1 root root 11 Oct 3 13:12 Fedora-Live-Cinnamon-x86_64-23-1 -> ../../loop0


In this case 2015-10-29-21-40-09-00 is the unique UUID of the iso filesystem and the unique label is Fedora-Live-Cinnamon-x86_64-23-1.

donatom
3rd October 2017, 11:17 PM
To check this you need to check the release string. For Fedora it should be /etc/redhat-release

I eliminated the LIVE label and used UUID for root. But still the driver is not being loaded. That was an excellent deduction on your part. Unfortunately that apparently was not the problem

I ran "cat /et/redhat-release" which indicated that I had booted my iso (generic fedora26).

By the way, here is my entire grub.cfg (Fedora-Custom is the messiest -- with many lines commented out):


insmod search_fs_uuid
search --no-floppy --set=isopart --fs-uuid 03a95642-a33a-48b7-91f1-51e9dec33b2d


menuentry "Fedora 26 Custom PERSISTENT" --unrestricted --class fedora {
set root2=(hd0,msdos1)
set root2=$root2
probe -l $root2 --set=root2vol
probe -u $root2 --set=root2uuid
echo "Persistent file should be $root2/LiveOS/overlay-$root2vol-$root2uuid"
echo "Persistent file Volume name should be LIVE"
if [ ! -e $root2/LiveOS/overlay-$root2vol-$root2uuid ] ; then echo ERROR: $root2/LiveOS/overlay-$root2vol-$root2uuid not found! ; echo Press ENTER to continue ; read ; fi
loopback loopo $root2/LiveOS/overlay-$rootvol-$root2uuid
probe -l (loopo) --set=loopol
if [ ! $loopol = "LIVE" ]; then echo "ERROR: $root2/LiveOS/overlay-$root2vol-$root2uuid has volume label of $loopol, not LIVE" ; read ; fi
set gfxpayload=1024x768,800x600
linux /LiveOS/vmlinuz initrd=initrd.img root=live:UUID=$root2uuid rd.live.overlay=UUID=$root2uuid overlay=UUID=$root2uuid live_dir=/LiveOS rootfstype=auto rw rd.live.image quiet nosplash rhgb rd.luks=0 rd.md=0 rd.dm=0 nomodeset
initrd /LiveOS/initrd.img
boot
}
menuentry "Fedora-Custom26+" {
search --no-floppy --fs-uuid --set=root 03a95642-a33a-48b7-91f1-51e9dec33b2d
set isofile="/Fedora-Custom/Fedora-Custom.iso"
loopback loop $isofile
set root=loop
linux /isolinux/vmlinuz root=live:LABEL=LIVE iso-scan/filename=$isofile rd.live.image quiet
initrd /isolinux/initrd.img
}

menuentry "Fedora-Server-Netinstall" {
set isofile="/Fedora-Netinstall/Fedora-Server-netinst-x86_64-26-1.5.iso"
loopback loop $isofile
linux (loop)/isolinux/vmlinuz ks=file:/ks.cfg inst.stage2=hd:LABEL=Fedora-S-dvd-x86_64-26 quiet ks=boot
initrd (loop)/isolinux/initrd.img
}


menuentry 'archlinux-2017.09.01-x86_64.iso' {
# path to the partition holding ISO images (using UUID)
set imgdevpath=/dev/disk/by-uuid/03a95642-a33a-48b7-91f1-51e9dec33b2d
set isofile=/boot/archlinux-2017.09.01-x86_64.iso
loopback loop ($isopart)$isofile
linux (loop)/arch/boot/x86_64/vmlinuz archisodevice=/dev/loop0 img_dev=$imgdevpath img_loop=$isofile earlymodules=loop
initrd (loop)/arch/boot/x86_64/archiso.img
}


I am going to delete the Fedora Server Netinstall iso to see if that has any effect on the drivers. It’s just a shot in the dark.

amiga
4th October 2017, 02:25 AM
I eliminated the LIVE label and used UUID for root. But still the driver is not being loaded. That was an excellent deduction on your part. Unfortunately that apparently was not the problem

Yes but apparently the booted iso still has the wrong file system, one different from the one in the actual iso file. As you posted the iso file has a kernel and modules directory of 4.12.14-300.fc26.x86_64. When you boot it the wrong file system is loaded. Even if I was wrong about the cause of the problem the problem is still that the booted iso has the wrong file system.


I ran "cat /etc/redhat-release" which indicated that I had booted my iso (generic fedora26).

You have two Fedora grub entries. Are they the same Fedora and kernel version ? When you run "cat /etc/redhat-release" do they both output the exact same string ?


By the way, here is my entire grub.cfg (Fedora-Custom is the messiest -- with many lines commented out):


You have added a very complex entry with overlays which you haven't posted before and are using UUIDs in that.

The menu entry for Fedora-Custom26+ is unchanged from your first post. You haven't changed root to use UUIDs in Fedora-Custom26+. Is this is your old grub.cfg or are you now using the much more complex Fedora 26 Custom PERSISTENT entry instead ? The use of overlays in this entry complicates matters.

You should change root to use UUIDs in the much simpler Fedora-Custom26+ entry without overlays. This is what I was recommending in my earlier post.

Could you make this change and post the new grub.cfg ?

donatom
4th October 2017, 04:36 AM
You have two Fedora grub entries. Are they the same Fedora and kernel version ? When you run "cat /etc/redhat-release" do they both output the exact same string ?

Right now I have only one custom iso -- or rather I have extracted LiveOS/ and isolinux/ and placed them in a directory (Fedora-Custom). I also had Fedora Server 26 Netinstall (the whole iso), but I have deleted that, so the Fedora-Custom contains the only "iso". I am not interested in the persistent Fedora; it was just something I was playing around with. And the Netinstall I used to do an automated install onto a hard drive.

I left out the menuentry that I am currently using; here it is (with UUID change, and without other unused -- commented out -- lines):


menuentry "Fedora-Custom" {
linux /Fedora-Custom/isolinux/vmlinuz initrd=initrd.img root=UUID=03a95642-a33a-48b7-91f1-51e9dec33b2d rhgb rd.luks=0 rd.md=0 rd.dm=0 nomodeset rd.live.image quiet
initrd /Fedora-Custom/isolinux/initrd.img
}

It boots up without problem but the modules for the kernel are not loaded and so the wifi does not work. As I said earlier, I use the same extracted iso for mbr usb drives, for efi drives and for hybrid drives and all drives have identical or nearly identical menuentries. While no drivers are loaded when the mbr drive boots, the other types of drives seem to function perfectly (wifi drivers are loaded and wifi works).

amiga
4th October 2017, 06:31 AM
I left out the menuentry that I am currently using; here it is (with UUID change, and without other unused -- commented out -- lines):



menuentry "Fedora-Custom" {
linux /Fedora-Custom/isolinux/vmlinuz initrd=initrd.img root=UUID=03a95642-a33a-48b7-91f1-51e9dec33b2d rhgb rd.luks=0 rd.md=0 rd.dm=0 nomodeset rd.live.image quiet
initrd /Fedora-Custom/isolinux/initrd.img
}

This menu entry is dramatically different than the one for Fedora-Custom26+ which used loopback devices. It is very easy to see what is going wrong here as you are using the wrong UUID and thus loading the wrong root file system.


menuentry "Fedora-Custom26+" {
search --no-floppy --fs-uuid --set=root 03a95642-a33a-48b7-91f1-51e9dec33b2d
set isofile="/Fedora-Custom/Fedora-Custom.iso"
loopback loop $isofile
...

The UUID in your new menu entry is identical to that of the partition which contains "/Fedora-Custom/Fedora-Custom.iso". This is very wrong. Looking back again at the menu entry for "Fedora 26 Custom PERSISTENT" I see you were making the same error.

I was talking about using the UUID of the iso filesystem when performing loopback. I showed how you could get this in post #15. You are apparently using the same UUID as the partition which contains the iso file which I assume is the / root directory of your parent Fedora installation with a kernel of 4.11. The parent installation is the Fedora installation you are using trying to do all of this.

What you did above is extract the kernel and initrd from the custom Fedora iso which are 4.12 but you aren't using the rest of the 4.12 file system in the iso. You haven't mentioned what your base Fedora installation is but I assume the kernel is 4.11. You are essentially trying to boot a different kernel and initrd while using the same file system as your parent Fedora installation. This doesn't make sense and is very wrong. As the kernel version 4.12 and the modules directory of 4.11 don't match no kernel modules will work.

Everything is clear now and the mystery is solved.

There is absolutely nothing wrong with the iso file itself which is why when you wrote it with dd to a usb flash drive it worked fine.

What you are doing in menuentry "Fedora-Custom" can't be done and doesn't make any sense.

If you want to boot this iso in loopback mode you need to refer to the file system on the iso itself by referring to its own UUID as I showed you in post #15.

donatom
4th October 2017, 07:59 AM
I posted this menuentry at the very beginning of the thread:


Here is another menuentry (I only use "LiveOS, isolinux, initrd.img and vmlinux" that I extracted from the iso):

Code:

menuentry "Fedora-Custom" {
#set isoname="Fedora-Custom.iso"
#set isofile="(hd0,msdos1)/Fedora-Custom/Fedora-Custom.iso"
#echo "Using ${isoname} . . . "
#loopback loop $isofile
#linux (loop)/isolinux/vmlinuz initrd=initrd.img root=live:LABEL=LIVE iso-scan/filename=$isofile rd.live.image quiet
#initrd (loop)/isolinux/initrd.img
linux /Fedora-Custom/isolinux/vmlinuz initrd=initrd.img root=live:LABEL=LIVE rhgb rd.luks=0 rd.md=0 rd.dm=0 nomodeset rd.live.image quiet
initrd /Fedora-Custom/isolinux/initrd.img
}



If you look at it carefully you will notice it is the same (except it uses LABEL instead of UUID). It works fine and I have been using very similar menuentries for the various iterations of Fedora for years.

amiga
4th October 2017, 08:22 AM
If you look at it carefully you will notice it is the same (except it uses LABEL instead of UUID). It works fine and I have been using very similar menu entries for the various iterations of Fedora for years.

In the very first post you said that this menu entry was also missing wifi drivers on mbr systems.


Here is another menuentry (I only use "LiveOS, isolinux, initrd.img and vmlinux" that I extracted from the iso):
....
Both methods are able to boot the iso successfully (mbr system missing wifi drivers, etc.)

The label in that example is that of the iso filesystem. In post 18 you were using the wrong UUID, that of the parent partition instead of the correct UUID of the iso filesystem which was causing the problem as the wrong root filesystem was being mounted.

What was going wrong in post #18 can easily be explained. The same effect was happening with other menu entries.

What may have worked in the past and what was causing the problems in this thread are two different things. If root=live:LABEL=LIVE is somehow defined and mounted correctly then it might work. However it wasn't working or you wouldn't have posted this thread.

I can't explain why this may have worked in the past. I can only describe what has been happening throughout this thread with the wrong root filesystem being mounted.

donatom
4th October 2017, 05:13 PM
Even if I mount the iso with loopback, modules are not being correctly loaded.

Here is my menuentry which boots but which boots without drivers:


menuentry "Fedora-Custom26+" {
search --no-floppy --fs-uuid --set=root 03a95642-a33a-48b7-91f1-51e9dec33b2d
set isoname="Fedora-Custom.iso"
set isolabel="LIVE"
loopback loop (hd0,1)/Fedora-Custom.iso
set root=loop
linux /isolinux/vmlinuz root=live:LABEL=$isolabel iso-scan/filename=Fedora-Custom.iso rd.live.image quiet
initrd /isolinux/initrd.img
}


The menuentry contains a label instead of UUID, but that does not seem to matter -- at least for me. Either way in mbr boot I get no modules.

I guess this will remain a mystery and I will just use hybrid or efi live usbs which always mount correctly.

Thanks for your help.

amiga
4th October 2017, 08:31 PM
The menuentry contains a label instead of UUID, but that does not seem to matter -- at least for me. Either way in mbr boot I get no modules.

You are still using the same stupid "LIVE" label you used before which didn't work and hasn't worked at all this thread. Also the UUID you were using before was completely wrong. Instead of finding the correct UUID you went back to a label which didn't work in post #1.

I showed you in post #15 how to find the actual internal label of the iso filesystem and its actual UUID. The actual internal label should have "Fedora" and "26" in it.


$ sudo mount -o loop Fedora-Live-Cinnamon-x86_64-23-10.iso /mnt/iso
mount: /dev/loop0 is write-protected, mounting read-only
$ sudo blkid /dev/loop0
/dev/loop0: UUID="2015-10-29-21-40-09-00" LABEL="Fedora-Live-Cinnamon-x86_64-23-1" TYPE="iso9660" PTTYPE="dos"

Please mount your custom iso file as -o loop and use blkid to find all of its attributes as I have done. Please post the results.

It is the LABEL and UUID from blkid /dev/loop0 that you need to use.

I told you how to find this actual iso UUID and LABEL from blkid /dev/loop0 and you ignored that advice and used a completely wrong UUID, that of your existing installation which is causing all of your problems. When I explained that this was wrong instead of following my directions to find the proper iso UUID you went back to what you did in post #1 which didn't work of course. Why do you post on forums if you ignore all advice and repeat what hasn't worked for you before ?


Even if I mount the iso with loopback, modules are not being correctly loaded.


This is because the wrong root file system is being loaded. Please stop talking about modules and drivers. This is the symptom and not the cause. I explained what is happening many times. The root filesystem is that of your parent Fedora installation. The Fedora custom iso is not being booted at all. Your are essentially running your existing Fedora installation with a different kernel. You aren't booting the custom iso at all as you aren't using its file system.


Here is my menuentry which boots but which boots without drivers

The entire iso filesystem is missing not just the drivers so therefore the iso is not really booting.


I guess this will remain a mystery

There is no mystery as to what is going wrong. None at all.

donatom
5th October 2017, 12:15 AM
It is the LABEL and UUID from blkid /dev/loop0 that you need to use.


amiga, I somehow glossed over your comment #15. I just went back and saw that you were talking about the uuid/label of the iso not of the partition. I mounted the custom iso and looked at the uuid and label of the iso, plugged the label into the menuentry and voila, wifi and modules are back.

You have solved my problem. Thank you very much for your persistence and hard work. I have been using the wrong uuid and label for years -- and yet the isos booted and functioned pretty well. I guess grub can be idiot-proof.

I will mark this as being solved straight away.

Thanks again.