From: Cameron K. <cam...@pa...> - 2002-09-23 02:34:52
|
Hi all, I was writing a laboratory tutorial today on managing the Linux kernel for both hardware and UML systems. It struck me that the documentation suggests in order to install modules, to mount the filesystem using loopback, and then use make modules_install MOD_INST_DIR(or whatever it is)=/foo/bar/ Since a large part (for me) of using UML is so they don't need root access, I decided I needed another way (I didn't want to have to mount them myself, and a "user" in fstab entry seemed unclean. So I came up with this. I'd appreciate any comments. Configure the kernel with modules enabled, but build in whatever you need to boot the system into the kernel, and build normally. make menuconfig ARCH=um #The -s means I only see warnings and errors, and is useful #if you're working over slow ssh links ;^) make -s dep clean linux modules ARCH=um strip -s cow/cameron/src/linux/linux cp cow/cameron/src/linux/linux cow/cameron/linux-foo Boot your system using your new kernel #I have my own script that does COW things and switch things LINUX=cow/cameron/linux-foo ./slackware foobar Now (notice we haven't needed root on the host so far), mount (using hostfs) the directory where your kernel source is. mkdir /mnt/mods mount none /mnt/mods -t hostfs -o \ /uml/slackware-8.1/cow/cameron/src/linux/ cd /mnt/mods make modules_install ARCH=um #Yes, you DO need ARCH=um here depmod -a #Just to check umount /mnt/mods shutdown -r now #Optional I hope someone can find this useful. -- Cameron Kerr -- Email: cam...@pa... Website: http://homepages.paradise.net.nz/~cameronk/ |