L.V.Gandhi's Pages

About Us
Linux
Other Links

Linux Booting Hints

Useful Sites
win 9x installed. MBR overwritten. How to get linux back?
How to choose GUI login manager
How to get/avoid GUI login?
How to use pictures for login?
How to use DOS like commands?
How to get password prompt after lilo prompt?
How to change forgotton root password?
How to change default OS in lilo?
Multiple OS Loader
How to get image appear during lilo boot
Booting win2k,winxp and linux
System Services

Useful Sites

LDE - The Linux Disk Editor
Making Bootable Linux CDs
Timo's Rescue Cd Set - Ver. 0.9
tomsrtbt home page

Top

win 9x installed. MBR overwritten. How to get linux back?

If you have boot disk, boot to linux and then do
/sbin/lilo -v
With recent distros load the CD 1 and boot to CD and use the rescue option.
If you don't have boot disk, as many, please do like this. Get hold of explore2fs.exe from net. Install it in windows partition. Run it.It will show you the linux partition. From there export vmlinuz to windows c: drive. See what is the root partition for linux if you don't remember. Copy loadlin.exe to c: Now boot in DOS mode not in DOS window. use the command
loadlin vmlinuz root=/dev/hdax where x is the correct root partition numberie 1, 2, 3, etc. Now you can go to linux. As root in console type
/sbin/lilo -v. Now your lilo is back.
Whenever one has to reinstall linux make a boot disk.
mkbootdisk --device /dev/fd0
However best option will be to install lilo in the boot sector of root partition. Use XOSl as given in hint 9 to load OSes

Top

How to choose GUI login manager

 /etc/sysconfig/desktop should contain the line for starting gdm
DESKTOP=GNOME
Replace GNOME with KDE for starting kdm.
see /etc/X11/prefdm:
        . /etc/sysconfig/desktop >/dev/null 2>&1
        [ -n "$DISPLAYMANAGER" ] && DESKTOP=$DISPLAYMANAGER
        if [ "$DESKTOP" = GNOME -o "$DESKTOP" = Gnome ]; then
                preferred=gdm
        elif [ "$DESKTOP" = "KDE" -o "$DESKTOP" = "KDE1" -o "$DESKTOP" = 
"KDE2" ];         then
                preferred=/usr/bin/kdm
        elif [ "$DESKTOP" = AnotherLevel ] ; then
                preferred=/usr/X11R6/bin/xdm
                                             


Top

How to get/avoid GUI login?

Edit first line without # ie comment line
id:5:initdefault:
number should be 3 for console ie non GUI login and 5 GUI login. This is for redhat or RH dependent systems.

Top

How to use pictures for login?

GDM and KDM allows to put pictures in login screen, so that user can click the picture, instead of typing login name. Get a scanned picture of the user preferably from passport size photo and resize it to 78x78 pixels and save it as username.png file in /usr/share/apps/kdm/pics/users for kdm login and configure as root login using preferences, login manager and users tab. In user tab select users to selected users and in show users, select selected users radio button. Next whenever kdm is working for login you can see pictures. For gdm, edit /etc/X11/gdm/gdm.conf. In [greeter] section put 1 instead of 0 for browser and put the above picture in the directory for hostimage in the same secion. Default used to be /usr/share/faces. In RH7.1 i see it as /usr/share/hosts. You can edit it here and put images in that folder. In Mandrake 8.2 put the pics in /usr/share/apps/kdm/pics/users

Top

How to use DOS like commands?

add alias in /etc/bashrc file as given below.
alias dir='ls -al --color=yes'
alias md='mkdir'
alias rd='rmdir'
alias copy='cp -i'
alias del='rm -i'
alias ren='mv -i'
In Mandrake 8.2 and after put the alises in /etc/profile.d/alias.sh for system wide use.For users, create .aliases in the home folder with above aliases and make it executable. Put an entry in .bashrc of that user as
source ~/.aliases.

Top

How to get password prompt after lilo prompt?

Edit /etc/lilo.conf file as root. Put the fillowing lines after prompt statement.
restricted
password=xxxxxxxx
Then save the file. Then at console do
chmod 600 /etc/lilo.conf
/sbin/lilo -v

Top

How to change forgotton root password?

Login to single user mode with the following command at lilo prompt
linux 1 init=/bin/sh root=/dev/hdaN mount rw
(where N is the number of your root partition)
After booting when you get prompt, change the password for root with the command:
passwd

Top

How to change default OS in lilo?

put a line in /etc/lilo.conf,
default=oslabel
where oslabel is label given to a OS you desire. Then save the file. Do
/sbin/lilo -v
Now next time you start lilo, default OS will alter.

Top

Multiple OS Loader

XOSL is eXtented Operationg System Loader
You can get it from xosl site
It can load multiple OS es linux multiple linuxes, WinXX, etc.
With mutiple linuxes load lilo in their boot sector of boot/root partition.Enable them in XOSL after that.

Top

How to get image appear during lilo boot

If u have a jpeg picture which u want to put as the lilo pic, than 1. Convert that picture using gimp to .pcx format. 2. Than change the image size to 320x200. In Gimp select image -> scale. 3. Than in the gimp menu select image -> indexed ( remember without this step the picture won't work ). 4. Rename the original message file mv /boot/message /boot/message.pcq 5. Now move your .pcx file to /boot with the name message. mv .pcx /boot/message 6 . lilo -v 7. reboot Courtesy Rajesh in LIH

Top

Booting win2k,winxp and linux
Install Win2k.  During install, define all your partitions, even the one for
Linux.
Install WinXP.
Install Linux.  Set lilo to 0 second delay and put it on the MBR.
Download BOOT.EXE and put it on a Win98 boot disk.
Boot from that floppy and use BOOT.EXE to copy the lilo MBR to a file.
Run fdisk /mbr to restore the Microsoft MBR.
Reboot into either Win2k or WinXP and copy that lilo MBR file to the NTFS
partition.
                                              
Edit the boot.ini file to include:
C:\mbr.lilo = "Linux Mandrake 9.0RC3"
Now, one can select any one of the 3 OS's. Win2k and WinXP both work better if they're running from a NTFS partition.
Here's the tutorial I used to get it running:
http://www.techhowto.com/How_to/dual_boot/lixnt.html
BOOT.EXE is available there.

Top

System Services

To get detail of system services to run while booting, have look at sites
http://www.mandrakeuser.org/docs/admin/print/service.html
http://www.tldp.org/HOWTO/Security-Quickstart-HOWTO/appendix.html

Top