Vir*_*yer 10 partitioning boot grub2 dual-boot windows-7
我有一个小问题。我有七个分区:
Device Boot Begin End Blocks Id System
/dev/sda1 * 206848 219013119 109403136 7 HPFS/NTFS/exFAT <-- wINDOWS 7
/dev/sda2 219013120 735516671 258251776 7 HPFS/NTFS/exFAT <--Musik,....
/dev/sda3 735516672 815638527 40060928 7 HPFS/NTFS/exFAT <-- Android
/dev/sda4 815640574 976771071 80565249 5 Erweiterte <-- No Idea:D
Partition 4 does not start at a physical sector boundary.
/dev/sda5 815640576 872494091 28426758 83 Linux <--Kali Linux
/dev/sda6 970151936 976771071 3309568 82 Linux Swap / Solaris
/dev/sda7 872495104 970149887 48827392 83 Linux <-- Ubuntu
Run Code Online (Sandbox Code Playgroud)
我找到了一个教程,但我试过这个,但它不起作用。这是链接:
http://www.webupd8.org/2012/03/how-to-dual-boot-android-x86-and-ubuntu.html
我使用了来自 android-x86.org 的 Android 和版本 android-x86-4.4-r1.iso。
这是我的 40_Costum 文档:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Android-x86" {
set root='(hd0,3)'
linux /android-x86-4.4-r1/kernel quiet root=/dev/ram0 androidboot_hardware=eeepc acpi_sleep=s3_bios,s3_mode SRC=/android-x86-4.4-r1
initrd /android-x86-4.4-r1/initrd.img}
Run Code Online (Sandbox Code Playgroud)
如果我启动我的电脑,GRUB启动管理器就会出现,我可以选择 Android,但它不能启动 Android。背景是紫色的,什么也没有发生。
什么是完整且有效的40_Customm
脚本?
如果我在 Grub Customizer 中创建一个脚本并保存它,它就不起作用。如果我再次打开 Grub 定制器,它不会显示在启动菜单上,脚本被删除。
这是我的代码:
set root='(hd0,3)'
`search --no-floppy --fs-uuid --set=root 28D9FDF951298246
linux android-x86/kernel root=UUID=28D9FDF951298246 quiet
androidboot.hardware=generic_x86 SRC=/android-x86 acpi_sleep=s3_bios,s3_mode
initrd Android-x86/android-4.4-r1/initrd.img
Run Code Online (Sandbox Code Playgroud)
现在我有一个额外的问题:
如果我启动我的笔记本电脑,它会显示 Ubuntu、Windows、Kali Linux 和 Android(不起作用),但是如果我启动 GRub Costumizer,Windows 没有列出?!但为什么?
对于 GRUB 1.97 - 1.99 和 2.00 +
为了方便起见,请安装 GRUB 定制程序 将这些内容输入终端模拟器: 代码:
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer
Run Code Online (Sandbox Code Playgroud)打开 GRUB 定制器并创建一个新的 GRUB 条目。
打开“来源”选项卡,输入以下内容:
set root='(hd0,4)'
search --no-floppy --fs-uuid --set=root e1f9de05-8d18-48aa-8f08-f0377f663de3
linux androidx86/kernel root=UUID=e1f9de05-8d18-48aa-8f08-f0377f663de3 quiet androidboot.hardware=generic_x86 SRC=/androidx86 acpi_sleep=s3_bios,s3_mode
initrd androidx86/initrd.img
Run Code Online (Sandbox Code Playgroud)以下是要更改的内容:
set root='(hd0,4)'
: 将 (hd0,4) 更改为已安装 Android x86 的分区。hd0 表示 sda,因此如果将其安装到 sdb,它将是 hd1 等等。hd0,4 表示分区号,在我的例子中,hd0,4 表示 sda4。所以如果你把它安装在sda6上,它将是hd0,6。
--set=root e1f9de05-8d18-48aa-8f08-f0377f663de3
:这里的随机数是安装 Android x86 分区的 UUID 您必须将其更改为正确的 UUID,您可以通过在 GRUB 定制器中创建新条目轻松获得 UUID,然后转到“选项”选项卡,然后在下拉列表中选择“Linux”选项。您将看到分区下拉列表,选择您的分区。打开源选项卡,您将在那里看到 UUID。
androidx86/
:Android x86 的根目录 将其更改为您的 Android x86 根目录。您可以通过导航到 Android x86 分区来查看您的 Android x86 根目录,您将看到一个以“android”开头的文件夹名称,这就是您的 Android x86 的根目录
androidboot.hardware
:当然是您的设备。注意:如果您使用的是 Android 2.3 - 4.0.3,请将其更改为 androidboot_hardware 以下是硬件列表:
generic_x86
:如果您的硬件未列出,请使用此eeepc
:EEEPC 笔记本电脑asus_laptop
:华硕笔记本电脑(仅支持华硕笔记本电脑)小智 -1
不要理会 sda 或 sdc,在我的情况下,如果您将 android x86 安装到启动设备,它总是 (hd0,x)。也就是说,就我而言,无论你的设备在ubuntu等操作系统中列为/dev/sda还是/dev/sdb,你都应该添加(hd0,x),x是你的android x86分区的编号,在grub中2 项,只要您使用安装 android x86 的同一设备启动(例如,您将 android x86 安装在分区 3 名为 U 的 USB 驱动器中,并且 U 在您的 ubuntu 中列为 /dev/sdc,但是您从U启动,那么你应该在grub中添加root=(hd0,3)而不是root=(hd2,3)。