In the morning, When inserted the USB device and issued the “fdisk -l” command,there was no item for USB device like sda1 in the list.I had to restart the computer and issued the former order again,the same thing happened with the following messages:
usb.c: USB device 2 (vend/prod ox9a6x0x8001)
is not claimed by any active driver.
I was very surprised,and then tried to execute the command:
# mount /dev/sda1 /mnt/usb
# ls /mnt/usb
It’s very strange!I could read the files from the USB device.I still did not know the reason.
Grub configuration. Grub is used to boot,it is written in the MBR(boot sector) of harddisk.Grub can boot many operating systems,such as NetBSD,windows.The /boot/grub/grun.conf is the boot manu created by grub,it also contains some important setting information.I will explain this file in detail. The string “timeout” of this file indicates the period of timeout,and the “default = 0” is used to set the default boot operating system,0 is the first listed operating system, and 1 means the second.The string “title” is the name of operating system, users can modify this name by themselves.I’ve renamed the Windows in this way.However,grub does not support Chinese.Splashimage is the backgroud of grub when starts the program.We can also modify this file whch is ofen in .xpm.gz formation,set our favorite picture to be the new background.I edited a picture and used “gzip -1 1.xpm” to create file named “1.xpm.gz”.however,the effection is not good.In my offic computer,the boot partition is known as (hd0,5) by the grub,but Linux recognizes the boot partition as hda6 by issuing “fdisk -l” command.
For example,” Kernel /vmlinuz-2.4.20 ro root=/dev/hda7 “.”/vmlinuz-2.4.20” means the loading kernel,and “ro root = /dev/hda7” is used to pass parameter.Here “ro” means read only.
“initrd” is used to initialize the linux image.Grub used chainloader technology to load other system’s boot information(eg Windows) into the grub boot loader.This statue seems like a chain so we always call this methed “chainloader”
How to make a grub boot disk?
# mke2fs /dev/fd0
# mount /dev/fd0 /mnt/floppy
# mkdir /mnt/floppy/boot
# mkdir /mnt/floppy/boot/grub
# cp /boot/grub/stage1 /mnt/floppy/boot/grub
# cp /boot/grub/stage2 /mnt/floppy/boot/grub
# grub
grub>root(fd0)
grub>setup(fd0)
grub>quit
How to recovery the grub distroied by Windows?
At first,startup the system by Linux setup CD,and when the installation interface is displaying,press F4 to run into linux rescue mode.
sh#
sh# grub
grub> root(hdx,y) Here y means the boot partition of linux.
grub>setup(hd0) Written grub to the MRB of harddisk device.
If grub hasn’t menu for user,how could us start operating system?
Get into the grub command line:
grub>cat (hd0,6)/grub/grub.conf
(Check the parameter of grub.conf,
note the 'hd0,6' is the boot partition,and then use this parameter to boot)
grub>root(hd0,6)
grub>kernel(hd0,6)/vmlinuz-2.4.20 ro root=/LABEL=/
grub>initrd (hd0,6)/init-2.4.20-9.img
grub>boot
What can I do if I forget the password of root?
In the grub,press “e”, and add “single” following “kernel(hd0,6)/vmlinuz-2.4.20 ro root=/LABEL=/”,note there is blankspace between “/” and “single”.
grub>kernel(hd0,6)/vmlinuz-2.4.20 ro root=/LABEL=/ single
and then press "enter" and "b" to start the system in single mode.
bash#
bash#passwd root
Here change the password of root.
I had two harddisk with each one has operating system.They were installed separately.One is Linux, and other is Windows.How could add windows boot information to linux’s grub (hd0,0)?
check the /boot/grub/device.map to identify whether “hd1” exist or not.If there was not,we shuold add it manually.and then issue the following command in grub:
grub>map(hd0) (hd1)
grub>map(hd1) (hd0)
This method i do not test is not sure.I’ll try later.
Sending email in telnet:
# telnet mail.phillip.com 25
helo
mail from: user@test.com
(The mail do not really exist,if use formation like "xxx@phillip.com",
the connect was off because it need certify the user.)
rcpt to: master@phillip.com
(The mail must based on "@phillip.com" domain)
date (Start writing content)
mime-version=1.0
from: phillip@milan.com
to: cocu@barcelona.com
cc: huang@china.com
subject: test letter
(Here we should press "enter" twice because of RFC882 rules)
(Here is the main content,and then type "." when complete)
.
quit (quit the mail server)
I tried this method many times,but many letters were considered as rubbish letters.