chris:b Posted August 18, 2007 Report Share Posted August 18, 2007 Maybe it is useful to explain a bit. This is about using a newer kernel on an -meanwhile- outdated base system. On a normal _installed_ Mandriva system, you can adjust everything manually.Compile your own kernel. A Live system is something different. The automatic hardware detection in the background depends on very specific scripts and kernel modules etc. Here are the basic things, and if ONE component changes, others won't work properly: * the kernel (yes, the IDE controllers are now modules and not compiled in) * the drakxtools (if you got a dependency with a higher version, the hardware detection on a live system will fail), they determine the whole hardware detection, and they usually change dramatically between two MDV versions * ldconfig, pci.id's, ldetect * initscripts ... and to follow these changes, the mklivecd scripts (building and setting up the live system) usually need a lot of changes. Quote Link to comment Share on other sites More sharing options...
unruh Posted August 18, 2007 Report Share Posted August 18, 2007 There is no options (with the mklivecd scripts) to boot more than one kernel. But you can install a second kernel on the running live system, and then tell the mklivecd build command to use this second kernel for building the new iso. example: mklivecd --kernel 2.6.21-2mdv OK, I am trying to set up a new kernel livecd. And it is a mess. I have set up a new kernel 2.6.17-14mdv with new alsa and madwifi. But the new live cd is failing because it cannot find unionfs. Now Mandriva 2.6.17-14mdv HAS unionfs (in /lib/modules/2.6.17-14mdv/kernel/fs/unionfs/unionfs.ko.gz) but apparently the script does not find it. Also since the unionfs is crucial to the operation of the livecd, as is squashfs, the script creating initrd should surely check to make sure that they are actually there. Making a livecd takes about an hour. and finding that at the end of thetime the created cd is totally uselss is frustrating. How do I make sure that unionfs and squashfs actually make it into initrd? And if from ash I try to insmod /initrd/loopfs/union/lib/moduels/2.6.17-14mdv/kernel/fs/unionfs/unionfs.ko.gz it tells me that it is an invalid module format (I assume it is because it is gzipped). Quote Link to comment Share on other sites More sharing options...
unruh Posted August 18, 2007 Report Share Posted August 18, 2007 PS: I made the new livecd with the command mklivecd --kernel=2.6.17-14mdv --tmp=/mnt/hda8/cd /dev/sda2/live14.iso after I had installed the new kernel and had installed the new madwifi modules and new alsa modules. Quote Link to comment Share on other sites More sharing options...
chris:b Posted August 19, 2007 Report Share Posted August 19, 2007 But the new live cd is failing because it cannot find unionfs That is not the exact error message you get. B) That is the result of something else what happens, for example not finding the cdrom. You can see it on your screen, but you don't tell ... And if you would like to debug the problem you have, you need to look closer at the linuxrc and how the live system boots, and how the init loads unionfs. It first unzips the module, then insmod it :-) Your problem are not the mklivecd scripts, rather something in your new kernel. Quote Link to comment Share on other sites More sharing options...
unruh Posted August 19, 2007 Report Share Posted August 19, 2007 OK, it just booted from the cdrom, but lets loook. Making extra nodes: OK Loading basid cdrom modules for Kernel 2.6 OK Starting USB support OK Probing USB devices OK Starting udevstart OK Searchinf for the loop image /dev/hdc DISK mounted OK Loading compressed loop module Loaded Mounting loop image on /initrd/loopfs OK --Exiting LINUXRC--------------- ---MKLIVECD RC.SYSINIT______________ /etc/rc.d/rc.sysinit:/etc/rc.d/rc.sysinit:548: /initrd/loopfs/bin/sed: not found /etc/rc.d/rc.sysinit:/etc/rc.d/rc.sysinit:548: /initrd/loopfs/bin/cat: no found setting up UNIONFS find:/initrd/loopfs/lib/modules/2.6.17-14mdv/kernel: no such file or directory BusyBox v1.1.2 (2006.12.14-05:46+0000) multi-call binary Useage: cp [ OPTION] .... SOURCE DEST insmod: can't read 'unionfs.ko': No such file of directory Failed to load unionfs module Loading /initrd/bin/ash Now, that sure looks like it cannot find union.fs Using ash I find that /initrd/loopfs has in it changes swap union Under union there are bin lib etc poweroff sbin var boot home opt root usr Ie, it seems that while it is looking in /initrd/loopfs/lib/.... the files are actually in /initrd/loopfs/union/lib...... When I installed the new kernel, I simply installed it using rpm. I have no idea where that "union" came from. Quote Link to comment Share on other sites More sharing options...
unruh Posted August 19, 2007 Report Share Posted August 19, 2007 Just made a new image, and looking in livecd.sqfs, all of the directories are actually links inot union. Ie, there should be alink from /initrd/loopfs/lib to /initrd/loopfs/union/lib, but it sems that all of those links have disappeared. (Why was it set up that way?) Quote Link to comment Share on other sites More sharing options...
unruh Posted August 19, 2007 Report Share Posted August 19, 2007 And now trying that CD, I find that the links are there but they point for example bin-> /union/bin. Note that initial / on the union directory. Of course /union does not exist. It is /initrd/loopfs/union. I think that /usr/share/mklinecd./rc.sysinit should just assume that the base in /initrd/loopfs/union, and NOT /initrd/looprs, and get rid of those silly links. Ah, of course. You have set up the new union file system on /union, and have set up all of the usual / directories to point to /union. But that means when the squashfs file system is set up, it uses that same structure, and all of the links point to /union. This means thay they become defunct when the / filesystem is mounted on /initrd/loop. Ie, either those links have to be made so that they point to union in a relative manner, or the rc.sysinit has to be redesgned so that it refers to /initrd/loopfs/union. There is also the danger of a successively receeding set of directories as people make more and more children. Ie, this filesystem will now be mounted on /union, so you will have /union/union and so on with deeper and deeper sets of links. Anyway, that gives me a cheap out. I can just make all those links be relative instead of absolute, and at least my upgraded system should worll. All this was so I could test out some laptops to see if they would run linux. Yee gads, my stubborness gets me in trouble at times. And now I found that I should have used the --root=/union flag in mklivecd all along. Perhaps that should be made the default. Oh well. What a way to waste a day. thanks again for making this available. Despite the long learning curve, it is a very very useful piece of software. Quote Link to comment Share on other sites More sharing options...
chris:b Posted August 19, 2007 Report Share Posted August 19, 2007 And now I found that I should have used the --root=/union flag in mklivecd all along. Perhaps that should be made the default. That is the default, in the wizard. But not on command line. mklivecd also needs to work on an installed system! Hint: there is a howto page, when you open a browser. :D The symlinks setup is not made by me, but by the main authors of the mklivecd scripts. And it will change, it is pretty dated meanwhile. Quote Link to comment Share on other sites More sharing options...
unruh Posted August 20, 2007 Report Share Posted August 20, 2007 That is the default, in the wizard. But not on command line. mklivecd also needs to work on an installed system!Hint: there is a howto page, when you open a browser. :D I would suggest that --root=/union be made the default for all cases. This is to try to idiotproof it since if that default is wrong in the case of an installed system, /union almost certainly will not exist and an error message will be gtenerated letting the preson know of the bad (in his case) default. On the web page, a line like Note that --root-/union must be used for creating a new liveCD from a live installation. As it is the only line where --root=/union is mentioned looks just like an example, rather than a crucial necessity, espeicially as most people have no idea what it means. Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts