Instaluję Androida X86 5.1-rc1 na moim laptopie. Mam na nim Windows XP i Lubuntu. Wiem jak go zainstalować, tylko nie wiem jak go potem dodać do GRUB’a. Przeglądałem różne poradniki, ale żaden nie jest do tej wersji Androida którą będę instalować. Wiem że na pewno trzeba będzie wpisywać tę komendę w terminalu:
gksu gedit /etc/grub.d/40_custom
no i potem będę musiał wpisać to do pliku:
menuentry "Android-x86" {
set root='(hd0,0)'
linux /android-4.0-RC1/kernel quiet root=/dev/ram0 androidboot.hardware=eeepc acpi_sleep=s3_bios,s3_mode SRC=/android-4.0-RC1 SDCARD=/data/sdcard.img
initrd /android-4.0-RC1/initrd.img}
tylko że nie będę instalować Androida 4.0 tylko Lollipopa. No i tu jest ten problem, bo nie wiem jak mógłbym zmienić te linijki tekstu. Mogą też być przedawnione.
Edit: A, jeszcze wiem że trzeba zmienić '(hd0,0)'na coś innego
Najlepiej zainstalować GRUB podczas instalowania Androida. Później możesz zalogować się w Lubuntu i z jego poziomu zainstalować GRUB (ten “lubuntowski” jeśli uważasz, że jest lepszy niż ten “androidowy”).
Chyba system plików. Android to Linux, więc jakiś Linuksowy bierz. O ile pozwoli ci wybrać podczas instalacji. Najlepiej chyba będzie jak weźmiesz ext jakiś.
Do przywracania GRUB-a służy taki fajny programik - skrypt:
#!/bin/bash
# Licensed under the GNU General Public License Version 2
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
####################################################################################################
## Copyright 2009-2011 Anthony Nordquist and Tony Brijeski
## Some of this code was borrowed from Tony Brijeski's Remastersys installer and Remastersys grub restore utility, and he deserves lots of credit for having code worth jacking. This code has been modified to suit the purpose of this program :)
## Cry like a little girl if we don't have root
TestRoot="$(whoami)"
if ["$TestRoot" != "root"]; then
zenity --info --title="$Title" --text="Must be run with root privileges, will now exit"
exit 0
fi
## Set some Zenity options
Title="Grub Doctor"
MENU="--list --column=Pick --column=Info"
progressbar () {
tail -f /usr/bin/grub-doctor | zenity --title="$Title" --text="$@" --progress --pulsate --auto-close
}
## Just in case people don't know what this is, inform them.
zenity --question --title="$Title" --text="This is a boot-loader restoration utility (Grub2), this should only be run from a live environment.\n\n Would you like to continue?"
if [$? != 0]; then
exit 0
fi
## Need to get the root partition from the user.
DRIVES=$(cat /proc/partitions | grep -v loop | grep -v major | grep -v "^$" | awk '{ print $4}')
for i in $DRIVES; do
partdrive="$i"
partdrivesize=$(grep -m 1 "$i" /proc/partitions | awk '{print $3}')
if ["$(echo "$partdrive" | grep [0-9] )" != "" ]; then
partdrivemenu="$partdrivemenu $partdrive $partdrivesize"
fi
if ["$(echo "$partdrive" | grep [0-9] )" = "" ]; then
GrubMenu="$partdrive Master-Boot-Record $GrubMenu"
fi
done
RootPart=""
while ["$RootPart" = ""]
do
RootPart=$(zenity --height="400" $MENU --title="$Title" --text="Please select the root partition of SalineOS, or another Grub2 based Linux distribution.\nThis partition will be the first entry in the installed grub boot menu" $partdrivemenu Exit "Quit Grub Doctor")
done
if ["$RootPart" = "Exit"]; then
exit
fi
## Find out where grub is going
GRUBLOCTEST=""
while ["$GRUBLOCTEST" = ""]
do
GRUBLOCTEST=$(zenity --height="400" $MENU --title="$Title" --text="\nPlease select where to install grub, selecting a disk will install grub to that disk's master boot record.\n" $GrubMenu root "Root partition - only choose this if you will be using a secondary boot manager" Exit "Quit Grub Doctor")
done
if ["$GRUBLOCTEST" = "root"]; then
GRUBLOC="/dev/$RootPart"
elif ["$GRUBLOCTEST" = "Exit"]; then
exit 1
else
GRUBLOC="/dev/$GRUBLOCTEST"
fi
## Ask for confirmation before we do anything drastic
zenity --question --title="$Title" --text="Grub will be installed on "$GRUBLOC"\n\nContinue with operation?"
if ["$?" = "1"]; then
zenity --info --title="$Title" --text="Operation cancelled, will now exit"
exit
fi
## Start Progress bar
progressbar "Installing and setting up grub...Please Wait\n"&
GrubDir="$(mount | grep $RootPart | awk '{print$3}')"
if ["$GrubDir" != "/"]; then
GrubDir="/tmp/remmnt/TARGET"
fi
## Unmount and remount the partition on /tmp/remmnt/TARGET rw
umount /dev/$RootPart
sleep 2
if [! -d $GrubDir]; then
mkdir -p $GrubDir
fi
mount /dev/$RootPart $GrubDir -o rw
## Prepare chroot
mount -o bind /proc $GrubDir/proc
mount -o bind /dev $GrubDir/dev
mount -o bind /sys $GrubDir/sys
## The meat and potatoes of this script
chroot $GrubDir chmod -x /etc/grub.d/20_memtest86+
chroot $GrubDir grub-install --no-floppy $GRUBLOC
chroot $GrubDir update-grub
## Dismount
umount $GrubDir/proc
umount $GrubDir/dev
umount $GrubDir/sys
## Stop the progress bar
killall -KILL tail
## Tell the user we are done now
zenity --info --title="$Title" --text="Grub installation complete."
## We came we did and now its time to leave, wam bam thank you mam style.
#Installing and setting up grub boot-loader, please wait.
exit 0
Wystarczy ten tekst skopiować do pliku, nadać mu prawa wykonywalności i nadać nazwę np. grub-doctor. Uruchamiać z sudo. Działa bardzo dobrze.
Wątpie czy zainstalujesz Linuksa na partycji FAT32 z tego powodu, że nie obsługuje on dowiązań, które są niezbędne dla Linuksa. A nawet gdyby jakimś cudem obsługiwał, to po co ci przestarzały system plików?
Mam problem, próbuję zainstalować Androida, ale mój dysk nie jest wykrywany. Wykrywany jest tylko mój pendrive. Nigdy nie miałem jeszcze takiego problemu przy instalowaniu jakiegoś systemu na tym laptopie.
EDIT: Wszedłem w “Create/Modify partitions”, zaznaczyłem że nie chcę skorzystać z jakiegoś narzędzia do partycji i wyskoczył mi ten komunikat:
Bad primary partition 0: Partition ends in the final cylinder.
Instalowałem android x86 z Lollipop , masz tu zawartość pliku którą tworzyłem.
Przy czym pamiętaj o zmianie numeru partycji i tablicy partycji .
#!/bin/sh
exec tail -n +3 $0
#def 3
# 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 5.1 on sdaX' --class android-x86 {
set root='(hd0,gpt3)'
linux /android-5.1-rc1/kernel root=/dev/ram0 androidboot.hardware=android_x86 quiet SRC=/android-5.1-rc1 DATA=/android-5.1-rc1/data
initrd /android-5.1-rc1/initrd.img
}