怎样判断linux系统是用lilo起的还是用grub起的

以前在redhat下我总是来看文件/etc/lilo.conf存不存在

和/boot/grub/目录下文件的多寡来判断系统是用什么起的的

后来发现网上有人写了个脚本

 

if dd if=/dev/hda bs=446 count=1 | strings | grep -q GRUB; then

echo "Your bootloader is GRUB"

elif dd if=/dev/hda bs=446 count=1 | strings | grep LILO; then

echo "Your bootloader is LILO"

else

echo "Unknown bootloader"

fi

这里的/dev/hda应该是系统盘的设备号

Discussion Area - Leave a Comment




*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word