Joined: 31 Jan 2005
|Posted: Wed Jun 08, 2005 9:04 pm Post subject: x-setup from the livecd tools mini-howto + full auto detect
|First this is a supplement to this post http://forums.gentoo.org/viewtopic-t-244837-highlight-mini+livecd.html which is quite large and hard to sift the goodies out of.
Goodie #1 qemu - For cdrom boot emulation of the livecd image you made. (before burning - very slow - amazingly accurate.)
qemu I have found as an excellent emulator to test your livecd iso image before burning. Many in the above thread have had problems and qemu is not perfect. It seems to have some module
issues when emulating the modprobe. Example: When I emulate my image it cant find my soundcard so pretends to load every alsa module. The real image works flawlessly.
But as far as emulating the cdrom boot - It has been dead on for me.
(outside chrooted environment)
|emerge qemu -pv
For 32 bit emulation
|qemu -cdrom livecd.iso -boot d |
For 64 bit emulation
|qemu-system-x86_64 -cdrom livecd.iso -boot d |
Goodie #2 livecd-tools
(inside chrooted environment for all of goodie #2)
|emerge livecd-tools -pv
If they are not already loaded livecd-tools, should load (depends on) , hwsetup, kudzu-knoppix, ddcxinfo-knoppix (x86 only) and mkxf86config
If you are on 2005+ profile in your chroot udev should be in once you build your system + hotplug.
If not put those in for good measue and coldplug too.
|emerge hotplug udev coldplug -pv
emerge hotplug udev coldplug
rc-update add coldplug autoconfig mkxf86config x-setup hotplug boot
This should give your cd full auto hardware detection just like gentoos livecd - except we take it a step further with x-setup
Part 3 x-setup to enable opengl-update-(ati, nvidix, or xorg-x11) or what I did to get it working again (inside your chroot)
What it does do...
It does detect my nvidia and does an opengl-update nvidia
What it doesn't do ...
It doesnt reorganize the /etc/X11/xorg.conf file for the detected card
It doesnt load the module for the detected card
Heres my work around , and things needed for this to work.
3-1. You will need to build modules for both ati and nvidia -- in your chroot environment.
YOUR chroot kernel may be different than the booted kernel. The ati module may not build - thought I havn't read up on it like nvidia; which does have a work
around for building a module, for a kernel that you are not booted in. -- If you want to save a cd - do the reading there is probably a way, but a cd with just vesa isn't too bad.
If your not booted in the same kernel as you are using in your chroot environment you may as well burn your iso without x-setup chroot back into your harddrive enviornment
By the way since you probably, and I know I did built a full blown kernel including drm (ati driver doesn't like this ), my drm stuff was all modular so in theory should not interfere
Nvidia complained about one of the drm modules sis I believe but of course it works fine anyway. But -- If someone can confirm this either way for the ati card I would appreciate it.
So heres an example from my booted cdrom - ati and nvidia modules not built yet.
(I put a /mnt/gentoo dir in my cd image so it is already there, you can mount to any rw dir.
|mount /dev/hda4 /mnt/gentoo **or whatever your root partition is I'm using dmraid so its /dev/mapper/pdc_ciiaceddj7 , you do know where your root partition is yes) |
Then chroot into your work environment like normal
Then I ran
|emerge ati-drivers ati-drivers-extra nvidia-kernel nividia-glx nvidia-settings -pv
emerge ati-drivers ati-drivers-extra nvidia-kernel nvidia-glx nvidia-settings
3-2. Now boot your regular system and chroot into your working area.
cp x-setup x-setup.orig
nano -w x-setup
make your functions in ati_gl and nv_gl like below
echo "ATI card detected."
mv /etc/X11/xorg.conf.fglrx /etc/X11/xorg.conf
echo "NVIDIA card detected."
mv /etc/X11/xorg.conf.nvidia /etc/X11/xorg.conf
3-3. Now as you have noticed you need to make an /etc/X11/xorg.conf.nvidia and /etc/X11/xorg.conf.ati -generically optimized for their manufacturers.
** I can only verify this works with the vesa , nividia driver, since I no longer have an ati card around.
That does it not too bad..
The solutions are easy. Its finding them that is hard.