在Linux下安装ubuntu

参考文档:

https://help.ubuntu.com/community/Installation/FromLinux?_ga=2.69816592.1437434885.1535268788-2026626150.1535268788

这个已经在linux下硬盘安装ubuntu的方式,亲测可行。缺点是需要2个分区,一个用于存放LiveCD解压后的ISO文件,另一个用于安装ubuntu系统。

我测试的是在grub2下直接启动LiveCD解压后的安装系统。文章里的是在运行的Linux系统上更新grub启动菜单的方式:

Configure grub2. Edit the file /etc/grub.d/40_custom and add the lines

 

menuentry "Ubuntu Ver??? Installer" {
        set root=(hd0,3)
        linux /casper/vmlinuz.efi boot=casper ignore_uuid
        initrd /casper/initrd.lz
}

Replace Ver??? with the version number and (hd0,3) with the new partition (for example, /dev/sda3 becomes (hd0,3) because Grub 2 counts drives from 0, but partitions from 1).

Then run update-grub to rebuild the grub configuration.

而我的步骤则是:

1. 开机启动后按ESC键进入GRUB。

2. 按上文的描述的方式设置好root.  (文中因为解压后的ISO存放在3号分区,所以是set root=(hd0,3)),根据自己实际情况设置好正确的root即可。

3. linux /casper/vmlinuz.efi boot=casper ignore_uuid    注意这个ignore_uuid挺重要,没有的时候进入不了安装系统。

4. initrd /casper/initrd.lz

5. boot

 

实际上如果linux已经在运行了,那么在分区里解压好ISO后,执行update-grub也能达到自动更新文章所说的grub菜单的效果。

 

 

 

 

 

 

 

 

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值