LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 4895|回复: 20

LFS 用家喜讯:boot LiveCD from hard disk - now possible!

[复制链接]
发表于 2007-7-14 06:55:54 | 显示全部楼层 |阅读模式
以前众多兄弟的欲望终於可以不作任何修改下实现了,引自 http://linuxfromscratch.org/pipe ... 07-July/004558.html
  1. Hello,
  2. starting from r1950, it is possible to store the LiveCD image on a partition
  3. (maybe even on a flash drive - but it is untested) as a file, and boot this
  4. file as a real CD. To do so, just extract the following files from the CD:
  5. boot/isolinux/linux (or linux64)
  6. boot/isolinux/initramfs_data.cpio.gz
  7. Copy them to your hard disk into the /boot/lfs directory. Copy the LiveCD
  8. image anywhere else. Let's assume it is
  9. /root/lfslivecd-x86-6.3-pre2-r1950.iso, and the root partition is /dev/hda2.
  10. Then, add the following to the GRUB configuration:
  11. title LFS LiveCD
  12.         kernel /boot/lfs/linux
  13. root=iso:/dev/hda2:/root/lfslivecd-x86-6.3-pre2-r1950.iso rw
  14.         initrd /boot/lfs/initramfs_data.cpio.gz
  15. That's all!
  16. The r1950 CD is currently being built on ums.usu.ru, I will post a download
  17. link when it is ready. Feel free to race with me if you have a faster CPU.
  18. --
  19. Alexander E. Patrakov
复制代码
随後 http://linuxfromscratch.org/pipe ... 07-July/004559.html
  1. I wrote:
  2. >         kernel /boot/lfs/linux
  3. > root=iso:/dev/hda2:/root/lfslivecd-x86-6.3-pre2-r1950.iso rw
  4. Sorry for line wrapping.
  5. Also I forgot to say that it should be possible to boot the LiveCD even from
  6. NTFS, even if you have only Windows XP (sorry, Vista is too new). The trick
  7. is to install grub4dos from
  8. http://sourceforge.net/project/showfiles.php?group_id=104188&package_id=111982
  9. If you also add the "toram" boot option, you can resize the NTFS partition
  10. and install LFS in the remaining space - using nothing but network as the
  11. installation media.
  12. --
  13. Alexander E. Patrakov
复制代码
也就是说,即使 iso 文档放到 windoze 里,只要用 grub4dos 也能"启动"了

补充:
1. 其实 CDROM 本来就是 read-only 的,在 ntfs 分区下能用 grub4dos 并不稀奇
2. r1950 是指 LFS LiveCD 的测试版,会随时更新的,下载地址:
http://ums.usu.ru/~patrakov/test/

[color="Red"]2007年8月18日更新:
这是 Jeremy Huntwork 协同开发 LFS LiveCD 後提供的另一个 master server
http://kerrek.linuxfromscratch.org/pub/lfs-livecd/
发表于 2007-7-14 07:48:06 | 显示全部楼层
哈哈,好爽啊!打个标记
回复 支持 反对

使用道具 举报

发表于 2007-7-14 09:01:46 | 显示全部楼层
正在苦恼LFS livecd的硬盘使用,做宿主...
谢谢楼主,辛苦了
回复 支持 反对

使用道具 举报

发表于 2007-7-14 14:03:58 | 显示全部楼层
这真是一个振奋人心的好消息。
大伙都来顶一下,我们来个人工置顶。
回复 支持 反对

使用道具 举报

发表于 2007-7-14 17:34:53 | 显示全部楼层
建议晨晨加到《LFS 从菜鸟到大师》去
回复 支持 反对

使用道具 举报

发表于 2007-7-14 19:39:31 | 显示全部楼层

http://www.linuxfromscratch.org/livecd/download.html

特别注意: 这里改 rw 为 ro ,防止出故障 。如果不用 ro 只读挂载 lfslivecd 所在的硬盘分区,在找不到或者无法挂载同名 iso 文件时可能会发生灾难。后果真的很严重!!

新版已出:
lfslivecd-x86-6.3-r2145.iso(已测,感觉不错)
lfslivecd-x86-6.3-r2145-nosrc.iso ( 准备自己下载更新的源码包的可以用这个)

x86_64 需要64位LiveCD的也可以试试这个:
lfslivecd-x86_64-6.3-r2145-nosrc.iso (不含源码包)
lfslivecd-x86_64-6.3-r2145.iso (含源码包)


x86和x86_64的LiveCD都可以做64位系统。光盘引导后按 F1 键,看下说明(可以先在虚拟机系统中试验下)。

已成功:
iso文件在IDE硬盘 /dev/hda4 这个分区的 LFS 目录下。
拷贝livecd中的 boot/isolinux/ 目录下的 linux linux64 initramfs_data.cpio.gz 这三个文件 到 livecd 同一硬盘分区某目录下。
先确定系统中有 GRUB 引导装载程序。windows用户可以用GRLDR以及grub for dos代替。


# 编辑添加到 /boot/grub/menu.lst文件时需去掉下一行首的 ” # “
#title LFS LiveCD ( 32bit )   
        root (hd0,3)
        kernel /LFS/linux root=iso:/dev/hda4:/LFS/lfslivecd-x86-6.3-r2014.iso ro
        initrd /LFS/initramfs_data.cpio.gz



64位的是这样:

# 编辑添加到 /boot/grub/menu.lst文件时需去掉下一行首的 ” # “
#title LFS LiveCD ( 64bit )   
        root (hd0,3)
        kernel /LFS/linux64 root=iso:/dev/hda4:/LFS/lfslivecd-x86-6.3-r2014.iso ro
        initrd /LFS/initramfs_data.cpio.gz


另外,还可以加上这些,当然,也可以加 vga=xxx 这样的参数。  

linux UTC=0 TZ=Asia/Shanghai LANG=zh_CN.UTF-8
新版多一个参数 nodhcp ,不要dhcp自动分配ip。在系统启动后可以用 net-setup 配置网络,包括ADSL拔号上网,无线没试过。
回复 支持 反对

使用道具 举报

发表于 2007-7-14 22:12:20 | 显示全部楼层
好消息,这个方法值得推广,以后live CD都这样搞!
回复 支持 反对

使用道具 举报

发表于 2007-7-18 14:28:22 | 显示全部楼层
太好了,
有个问题
网上的
lfslivecd-x86-6.3-pre2-r1950-nosrc.iso和lfslivecd-x86-6.3-pre2-r1950.iso有什么区别,差1-2百M呢
回复 支持 反对

使用道具 举报

发表于 2007-7-18 14:28:46 | 显示全部楼层
网络不好,重发了,呵呵
回复 支持 反对

使用道具 举报

发表于 2007-7-18 16:42:33 | 显示全部楼层
Post by lwc1123
太好了,
有个问题
网上的
lfslivecd-x86-6.3-pre2-r1950-nosrc.iso和lfslivecd-x86-6.3-pre2-r1950.iso有什么区别,差1-2百M呢

看文件名就知道了嘛。
nosrc 就是 没有 sources (源码包) 。只有一个系统和手册/文档。这样,你可以选择在线手册,因为在线的手册更新比较快,可以用更新的软件,当然可能会有一些这样那样的问题。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表