LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware 14.1 in MS Hyper-V (https://www.linuxquestions.org/questions/slackware-14/slackware-14-1-in-ms-hyper-v-4175486298/)

marky9074 02-12-2018 01:33 AM

OK I booted of media install again, and re-run mkinitrd and then lilo (which complained of no /proc/partitions). This time it booted past the dots and got to 'No kernel moduled found for Linux 4.4.115'...

I feel I am getting closer, but maybe should just stay with the stock 14.2 off the disk with multilib, as I'm only doing some quick testing...

a4z 02-12-2018 01:44 AM

I think this is one of the issues that have to be fixed from distribution site
to me it seems it is just activate the, for hyper-v required, modules in the kernel config.
There are obviously use cases for running Slackware on hyper-v, it is possible with a workarroundm, but an updates break it since it will replace the kernel and you need to know that after the update and before the reboot you need to apply the mkinitrd for the newly installed kernel, so form what I see this looks like it is not working properly (to avoid the word broken).
But maybe there is some deeper reason why hyper-v is not activated per default for Slackware, if so, it would be nice to know.

bassmadrigal 02-13-2018 06:15 PM

You need to use the -k option with mkinitrd or mkinitrd_command_generator.sh to make sure it's going to look for the correct kernel modules.

Code:

/usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.115

marky9074 02-22-2018 12:51 AM

Quote:

Originally Posted by bassmadrigal (Post 5819568)
You need to use the -k option with mkinitrd or mkinitrd_command_generator.sh to make sure it's going to look for the correct kernel modules.

Code:

/usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.115

Sorry not been back until now. Took a minute to realise that this essentially just creates a suggestion of the command to use to make initrd. Therefore the only difference to the previous string was to add the -k 4.4.115 which worked well.

Thanks for the help.

Code:

mkinitrd -c -k 4.4.115 -f ext4 -r /dev/sda2 -m hv_vmbus:hv_storvsc:mbcache:jbd2:ext4 -u -o /boot/initrd.gz

dalacor 05-17-2020 07:06 AM

1 Attachment(s)
I am probably missing a step somewhere or not understanding something. I have always run Slackware bare metal in the past.

I have installed Slackware as follows:

/dev/sda1 as 200mb EFI (which seems to be Vfat). Not sure if this is relevant
/dev/sda2 as 2gb Swap.
/dev/sda3 as 100GB EXT4 (This is where Slackware and all the applications are installed).

My understanding is that I run the menu setup in the normal way including setting up eliloconfig, fstab etc and when I get to the end and exit, I instead no I don't want to reboot.

Then I type the following commands:

mount -t ext4 /dev/sda3 /mnt (to mount my slackware partition where I just installed Slackware)
chroot /mnt
cd /boot
mkinitrd -c -k 4.19.27 -f ext4 -r /dev/sda3 -m hv_vmbus:hv_storvsc -u -o /boot/initrd.gz OR mkinitrd -c -k 4.19.27 -f ext4 -r /dev/sda3 -m hv_vmbus:hv_storvsc:mbcache:jbd2:ext4 -u -o /boot/initrd.gz (with same result)

Restart Linux and boot up Slackware in the normal way.

I have attached a screenshot of the error messages that I am getting. I have tried a number of different things, but I can't seem to work out what the problem is other than the fact that it might be that /boot/efi/.... directories don't seem to show up and this might be the issue? Hopefully I have just missed a step somewhere.

dalacor 05-17-2020 11:18 AM

I had a break from this. Looking through my notes again I see I forgot to run eliloconfig. So I ran mount -t vfat /dev/sda1 /boot/efi (after cd /boot command) and then ran eliloconfig after I ran the mkinitrd command. Then shut down the VM again. But I am getting pretty much the same messages. Various websites keep talking about creating a lilo.conf file /etc, but I am using elilo and the config is not in /etc, it's in /boot/efi/EFI/slackware so I am doing this by running Eliloconfig but it is clearly not working.

bassmadrigal 05-17-2020 12:47 PM

The errors state that "Exec format error". This could mean that you installed a 64bit module package with a 32bit kernel.

It'd probably be a better suggestion to create a new post instead of resurrecting a 2 year old post.

rkelsen 05-17-2020 04:45 PM

Quote:

Originally Posted by dalacor (Post 6124259)
Various websites keep talking about creating a lilo.conf file /etc, but I am using elilo and the config is not in /etc, it's in /boot/efi/EFI/slackware so I am doing this by running Eliloconfig but it is clearly not working.

Actually, that part is working. It is finding and loading the kernel. Your problem is that the ext4 module isn't loading and therefore the kernel can't see the root filesystem.

As to the reason for that, I'm not 100% sure. Check what bassmadrigal suggested as a starting point.

Edit: The quickest/easiest fix is to compile filesystem support into your kernel. Choose (Y) instead of (M) for the filesystem you're using. That'll circumvent any initrd issues, etc.

dalacor 05-18-2020 01:35 PM

I haven't the slightest idea what the original cause was. I downloaded the latest Current ISO as the Current ISO I had was from March last year. I installed Slackware in the normal way and exited the install menu.

Then I did the following:

chroot /mnt
mkinitrd -c -k 5.4.41 -f ext4 -r /dev/sda3 -m hv_vmbus:hv_storvsc:mbcache:jbd2:ext4 -u -o /boot/initrd.gz
(replace 5.4.41 with current Linux version)
Eliloconfig
Reboot Computer

This worked flawlessly. I can only assume that there was something wrong with the version of Slackware current that I had?

When I update all the Slackware packages including the kernel on a bare metal machine - I normally use this command to update the kernel

mkinitrd -c -k 5.4.20 -m

I assume with a virtual machine setup, when I update Slackware to the latest version I need to run this command instead

mkinitrd -c -k 5.4.41 -f ext4 -r /dev/sda3 -m hv_vmbus:hv_storvsc:mbcache:jbd2:ext4 -u -o /boot/initrd.gz
(replace 5.4.41 with current Linux version)

Is it really necessary to have -f ext4 -r and the -u and -o and /boot/initrd.gz bits because I don't have this on a bare metal setup. Is the -c -k and -m not sufficient?

I am delighted to have got this working. I will now setup my minimal Slack install.

rkelsen 05-18-2020 04:41 PM

Slackware 14.1 in MS Hyper-V
 
Good to see you got it working!

Next challenge: Install the integration package for HyperV.

The best part: All you need is an internet connection and you'll be able to administer the machine from anywhere.

Happy trails my friend.


All times are GMT -5. The time now is 05:47 PM.