Ubuntu下使用软盘实现floppylinux(1)

来源:互联网 发布:梦幻西游有mac版吗 编辑:程序博客网 时间:2024/04/29 15:05

1.安装busybox1.22.1

make menuconfig遇到问题:

compilation terminated.
make[2]: *** [scripts/kconfig/lxdialog/checklist.o] Error 1
make[1]: *** [menuconfig] Error 2
make: *** [menuconfig] Error 2

解决方法:sudo apt-get install libncurses5-dev,安装之后问题解决。

2。配置busybox

General Configuration应该选的选项 
Show verbose applet usage messages 
Runtime SUID/SGID configuration via /etc/busybox.conf 
Build Options 
Build BusyBox as a static binary (no shared libs) 
Installation Options 
Don't use /usr 
其他选项都是一些linux基本命令选项默认 
配置好后退出并保存. 

3.编译并安装busybox 
#make 
#make install 
编译好后在busybox目录下生成子目录_install,里面的内容: 
drwxr-xr-x 2 root root 4096 11月 24 15:28 bin 
lrwxrwxrwx 1 root root 11 11月 24 15:28 linuxrc -> bin/busybox 
drwxr-xr-x 2 root root 4096 11月 24 15:28 sbin 
其中可执行文件busybox在bin目录下,其他的都是指向他的符号链接.

4.软盘上安装引导器(grub)
具体操作如下:
# mke2fs /dev/fd0
创建了 ext2 文件并挂载软盘
root@ubuntu:/mnt# mkdir /mnt/floppy
root@ubuntu:/mnt# mount /dev/fd0 /mnt/floppy
现在,创建一些目录,并将一些关键文件复制到软盘:
# mkdir /mnt/floppy/boot 
# mkdir /mnt/floppy/boot/grub 

安装grub

apt-get install grub

此时安装的为grub2,需要grub_legacy,

sudo apt-get purge grub-pc 
sudo rm /boot/grub/* 
sudo apt-get install grub 
sudo grub-install --recheck /dev/sda 
sudo update-grub 
sudo vi /boot/grub/menu.lst 

之后
 # cp /boot/grub/stage1 /mnt/floppy/boot/grub 
# cp /boot/grub/stage2 /mnt/floppy/boot/grub
运行grub命令
在 grub> 提示符处,输入: 
 grub> root (fd0) 
grub> setup (fd0)
 grub> quit 
引导盘完成。

5.剩下的看网址:

http://blog.csdn.net/tianzhihen_star/article/details/8797469


很不幸,这个作业最后不了了之了,没有实现。软盘都没有了,现在做这个也没什么意义了。



0 0
原创粉丝点击