
KNOW-HOW Ask Klaus! ASK KLAUS! to report the right configuration options. If you use the “persistent Knoppix This is usually 1024x768 in 75Hz. If your image” feature, the automatically cre- notebook has a native 1280x800 resolu- ated /etc/X11/xorg.conf file will be tion, and it is not DDC-capable (i.e., reused on the next boot, so you don’t Klaus Knopper is the creator of Knoppix cannot read this information have to enter the boot options again. Knoppix and co-founder of the from the graphics adapter and display), To manually configure your X Server, you only get the 1024x768 resolution. you can use LinuxTag expo. He currently To change this, boot with the follow- ing options, entered at the boot prompt: works as a teacher, program- dpkg-reconfigure xserver-xorg mer, and consultant. If you have knoppix screen=1280x800 U in Debian. vga=normal a configuration problem, or if Migrating Settings The vga=normal stays in text mode I have been a subscriber to your you just want to learn more until the X Server is started. It’s probably magazine from the beginning, about how Linux works, send not necessary if your notebook handles but I have the following prob- the framebuffer mode 1024x768 well lem. I had a web server, with SQL, your questions to: using resolution scaling. email, etc. on a Pentium II machine. You may have to add horizontal and/ Now I have updated my hardware to klaus@linux-magazine. com or vertical frequencies according to your Pentium 4 with dual core and a mother- computer’s technical specs in the man- ual: Listing 1: Mount Flags Screen Resolution 01 mkdir /mysystem I’m using the Knoppix distribu- knoppix screen=1280x800 U tion and very much like it. Be- hsync=90 vsync=75 02 mount -o dev,suid /dev/hda2 / cause I’m a beginning Linux mysystem user, though, I am having some prob- Some other live distros use the maxi- 03 mount -o dev,suid /dev/hda5 / lems. The screen resolution in my porta- mum resolution and let the graphics card mysystem/home ble computer is 1280x800, but this mode handle out-of-range conditions, thus giv- 04 mount -o dev,suid /dev/hda6 / is not available on my system. I’ve heard ing better initial settings for high resolu- mysystem/var there is a solution for this, but I am hav- tion monitors without needing boot op- 05 mount --bind /proc /mysystem/ ing difficulties finding it. Please give me tions. But if you have fried an old VGA proc some advice. Video card drivers are pres- monitor once like I did (including white ent. My video adaptor is Intel Mobile smoke, noise, and stench, not a pretty 06 mount --bind /sys /mysystem/ 915GM; the default modes, which are sight) using too high resolutions and fre- sys found by Knoppix (hotplug , I think), are quencies, you tend to be more cautious 07 mount --bind /tmp /mysystem/ 1024x768 and 800x600. not to ruin old hardware; that’s why tmp Knoppix is very conservative about reso- 08 # If you are using udev, you Knoppix tries to run only safe lutions and frequencies unless you either will also need this: resolutions and frequencies on have a monitor that reports its preferred 09 mount --bind /dev /mysystem/ your graphics adapter and moni- settings properly, or you specify boot op- dev tor by default, if the hardware is not able tions that do the trick. 56 ISSUE 74 JANUARY 2007 WWW.LINUX - MAGAZINE.COM Ask Klaus! KNOW-HOW board with an integrated RAID control- piled in, instead of loading modules on If you don’t like the sound of the “quick ler. demand. way,” you may be better off with the My question is, how can I migrate all I would recommend you at least stati- other solution, which I would call the my data and configurations to my new cally compile in everything that’s needed “right way.” This approach requires in- machine? Bear in mind that my current for mounting the root filesystem, so you stalling an up-to-date operating system kernel is 2.4 and now I will have to won’t need an initial ramdisk. Marking and all needed applications, then migrat- migrate to 2.6.16. testing, which is the the controller and the needed file ing the configuration files and data. only kernel that recognizes my RAID system(s) with y in make menuconfig of This is the method I would recom- controller. the kernel can make testing, upgrading, mend to provide a clean start, get rid of and debugging your system much easier, obsolete programs (with potential secu- Moving the operating system, because it keeps initrd/ initramfs and rity flaws), and reach a state-of-the-art applications, and data to a new module-related problems out of the criti- system that’s easier to keep up to date. machine is a common task, yet cal boot phase. This method requires somewhat more it is not always easy to find the best In case something goes wrong, you work, though, especially when configu- strategy to do this. can use a Kernel 2.6-based live CD to ration files have changed in syntax and There are basically two strategies. The find out what you have forgotten in location. Also, finding out which files quick solution is to try to move all data, order to get the copied system up and need to be transferred, and which ones including the operating system, libraries, running (see below). have been changed from the default and everything else, and then just So, the sequence would be: setup, is not always easy if you did not exchange the kernel to match the new 1. Copy everything to the new machine, write down a log of changes you made hardware. either with a 1:1 copy of your hard over the past years. (Almost nobody This strategy is probably the fastest disk, or remotely to one or many documents changes on their own servers way, but it is only possible if the hard- freshly formated and mounted parti- well enough. I don’t either, but I know ware architecture does not change in a tions on the new server. I recommend people must exist somewhere who do.) way that your applications (compiled for you type: Anyway, using this strategy, you a specific processor) won’t run anymore. rsync -Hav old_root_dir [root@U would first partition the new system and When moving from a Pentium II, in your remote-machine:] new_root_dir install Debian (as an example) from example, to a Pentium 4, this should not as root user in both cases. scratch, including all programs and ser- be a big problem. The only thing you 2. Configure and compile a new kernel vices you will need. It’s not always suffi- need to do is configure and compile the on the new machine, and at least up- cient to check on your old system with new kernel to match your hardware. date modutils. You may find it useful When moving from Kernel 2.4 to 2.6, to (as root) chroot to new_partition on ps auxw you will have to update at least your the new machine, so you are already modutils (modprobe, insmod,rmmod) working “inside” your copied system, to see what servers are running. (netstat because the module handling has if you can’t boot directly with the old -tulpe is also a good way to see what’s changed in 2.6 in a way that modutils kernel or the new one is not yet work- currently listening for connection re- from 2.4 simply won’t work anymore. ing right because you forgot some- quests.) There may be support programs Of course, you could as well use a static thing in the configuration. Please note or libraries (such as php) that don’t kernel with everything you need com- the comment about chroot below. show up directly in the list of processes. Use dpkg -l or rpm -qa on your old ma- Rescuing Your System chine to see what’s installed, and write If you wish to repair or update an in- Note that Listing 1 is only an example down all packages that you will proba- stalled system that cannot boot directly, that most likely will not match your fstab bly need. It’s usually a long list. you can use a “rescue system.” Some entries: After your new system is up and run- root server hosting providers offer this The last --bind mount is useful if you ning (including the perfect kernel for service in the form of a network-booting want to have access to a running X your hardware setup), you will have to (diskless) rescue boot that allows you to Server through its socket in /tmp, from transfer and maybe rewrite your configu- mount partitions and change files on inside the yet-to-be-handled chroot ration files for all services. I would rec- your server even if the system installed system. ommend doing this option-by-option in on disk is woefully defective and in a Now, provided that the partitions have each config file, because, if you also non-booting state. (You can also use been mounted in the correct order Knoppix for this rescue task, eventually switched from Apache 1.3 to the 2.x ver- (check etc/fstab in the root partition with a knoppix.sh script that starts an sion, for instance, the syntax and loca- again), you should be able to SSH server with your ssh key so you can tion of the config files will change, and perform a remote login.) chroot /mysystem trying to just copy the configuration files As soon as the rescue system is up, and, until you exit this shell, you can is most likely a very bad idea that can in- mount the hard disk partitions in the work inside the previously installed troduce security holes by enabling add- correct order and hierarchy.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages3 Page
-
File Size-