An updated installer for Androidx86

1,591 views
Skip to first unread message

Joan R. Serra

unread,
Apr 16, 2015, 10:11:20 AM4/16/15
to andro...@googlegroups.com
It would be nice to have a more modern installer based on cgdisk, to install and test androidx86 images ...

I have inspected form source:
bootable/newinstaller/install/scripts/1-install

...
"

fdisk -l | grep ^/dev | cut -b6-12,55- | awk '{

        if (!match($2, "Extended")) {

            printf("\"%-28s", $0)

            system("echo -n `cat /sys/block/*/"$1"/../device/model`")

            printf("\" \"\"\n")

       }

"

fdisk -l does not see harddisk with GPT and:

....

"

if [ $count -eq 1 ]; then

        choice=`awk '{ print $1 }' $menufile`

        retval=0

    else

        choose "Choose Drive" "Please select a drive to edit partitions:"

    fi

    if [ $retval -eq 0 ]; then

        cfdisk /dev/$choice

        if [ $? -eq 0 ]; then

            retval=1

        else

            retval=255

        fi

    fi

    return $retval

"

cfdisk "does not understand" GPT partitions ....

Sorry I have not skills enough to solve this issue .... :(


Joan R. Serra

unread,
Apr 16, 2015, 10:13:34 AM4/16/15
to andro...@googlegroups.com
pd: I have inspected FROM source: bootable/newinstaller/install/scripts/1-install

I MEANT

Chih-Wei Huang

unread,
Apr 16, 2015, 10:25:57 PM4/16/15
to Android-x86
2015-04-16 22:13 GMT+08:00 Joan R. Serra <joa...@gmail.com>:
> pd: I have inspected FROM source:
> bootable/newinstaller/install/scripts/1-install

You are correct to spot the problems.
I've planned to fix it but no time to make progress.

Patches are welcome.

Joan R. Serra

unread,
Apr 17, 2015, 10:42:13 AM4/17/15
to andro...@googlegroups.com
 sorry I do not have updated knowledge to do a patch .... where can I learn ?

Thanks for your response and for thanks your work Chih-Wei.

hatharry

unread,
Apr 18, 2015, 10:29:17 AM4/18/15
to andro...@googlegroups.com

So far I have managed to get the installer to list gpt partitions. patch is attached.

Works fine if partitions and grub2 are preconfigured using live linux.

still to do:
add cgdisk to the source
add grub2 and write cfg file
gpt_install.patch

Chih-Wei Huang

unread,
Apr 18, 2015, 12:02:55 PM4/18/15
to Android-x86
2015-04-18 22:29 GMT+08:00 hatharry <hath...@gmail.com>:
>
> So far I have managed to get the installer to list gpt partitions. patch is
> attached.
>
> Works fine if partitions and grub2 are preconfigured using live linux.

Thank you for the nice work.

However, it seems you assume the block device name
to be sdX:

fdisk -l | grep ^/dev/sd ...
...
blkid | grep ^/dev/sd ...

This is too limited.
We have to support other name like
mmcblkXpYY, hdX, vdX, ...
(see the initrd/init)


> still to do:
> add cgdisk to the source
> add grub2 and write cfg file


--
Chih-Wei
Android-x86 project
http://www.android-x86.org

hatharry

unread,
Apr 18, 2015, 12:55:20 PM4/18/15
to andro...@googlegroups.com
Thanks :-)

how would I emulate those drive types?

would this patch work?
gpt_install2.patch

hatharry

unread,
Apr 18, 2015, 10:49:46 PM4/18/15
to andro...@googlegroups.com
removed loop devices from list
gpt_install3.patch

Joan R. Serra

unread,
Apr 19, 2015, 2:56:43 AM4/19/15
to andro...@googlegroups.com

Thanks hatharry , Go Go Go !!! :-)

--
You received this message because you are subscribed to a topic in the Google Groups "Android-x86" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-x86/WwH8jQAvFGQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-x86...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.

hatharry

unread,
Apr 19, 2015, 7:32:26 AM4/19/15
to andro...@googlegroups.com
i found gptfdisk for android. i added it to a new folder called gptfdisk.
I followed the read me then recompiled android.
Gdisk is still not available. Is there something i am doing wrong?

Chih-Wei Huang

unread,
Apr 19, 2015, 10:27:29 AM4/19/15
to Android-x86
2015-04-19 19:32 GMT+08:00 hatharry <hath...@gmail.com>:
> i found gptfdisk for android. i added it to a new folder called gptfdisk.
> I followed the read me then recompiled android.
> Gdisk is still not available. Is there something i am doing wrong?

Did you try in kitkat-x86 or lollipop-x86?

Note the installer runs in ramdisk from initrd.img
which is glibc based.
We can still run the android executables (bionic linked)
except in kitkat-x86. I still don't know the root cause.

Anyway, basically speaking you don't need to build
it to be an android executable.
(won't work in kitkat-x86)
Just put a glibc linked executable to installer.img
then it should work.

hatharry

unread,
Apr 19, 2015, 10:35:57 AM4/19/15
to andro...@googlegroups.com
I am using kitkat-x86. would finding a glibc based gdisk and cgdisk work?

hatharry

unread,
Apr 20, 2015, 12:05:47 PM4/20/15
to andro...@googlegroups.com
Good news everyone.

I managed to get cgdisk working.

just extract the zip to /bootable/newinstaller/install and apply the patch.
gdisk_for_install.zip
gpt_install4.patch

Chih-Wei Huang

unread,
Apr 20, 2015, 12:12:09 PM4/20/15
to Android-x86
2015-04-21 0:05 GMT+08:00 hatharry <hath...@gmail.com>:
> Good news everyone.
>
> I managed to get cgdisk working.
>
> just extract the zip to /bootable/newinstaller/install and apply the patch.

Thank you for the effort to improve it.

Could you please use git to generate the patch?

git add _file_you_added_or_modified_
git commit (write summary and description for this patch)
git format-patch -1

Then send me the 0001-* file, or just
use git send-email.
(see man git-send-email for details)

hatharry

unread,
Apr 20, 2015, 12:47:31 PM4/20/15
to andro...@googlegroups.com
Find patch's attached
0001-Added-gdisk-tools-and-gpt-support-to-installer.patch
0001-Added-gpt-menu.patch

hashirt

unread,
Apr 20, 2015, 6:05:31 PM4/20/15
to andro...@googlegroups.com
I tested the last image at the android-x86.net (named: android_x86-5.1.0_r3-20150413)

During installation I noticed that usb device I used as install medium (I prepared it using 'LinuxLive USB Creator 2.9.2') is listed as a possible install directory at "choose partition" step. I didn't follow through that scenario to see what happens if I choose it and I don't know if this was the case all along but I thought I should mention it thinking maybe this wasn't intended.

And secondly, seeing the work on the installer, I have a small suggestion of making the installer multilingual. I tried to think of a way of doing this and my only idea is that grub could first list the languages and after the selection, boot options, installation process could be in that language. I'm a novice user and don't know if this is possible but I would gladly help with translating to my language.

Love your guys' work BTW!

Joan R. Serra

unread,
Apr 22, 2015, 3:40:15 AM4/22/15
to andro...@googlegroups.com
Many thanks for your work !!!

How can I add these patches to my source andx86-4.4 to compile ?

hatharry

unread,
Apr 22, 2015, 10:06:36 AM4/22/15
to andro...@googlegroups.com
cd bootable

git apply -v path/file.patch

hatharry

unread,
Apr 24, 2015, 9:15:11 AM4/24/15
to andro...@googlegroups.com
Full GPT installer support including gpart and grub2.

Please make sure you have or create a 512MB+ partition at the beginning of the drive.
0001-gpt_grub2.patch

Joan R. Serra

unread,
Apr 27, 2015, 2:36:38 AM4/27/15
to andro...@googlegroups.com
Many Thanks hatharry and Chih-Wei !!!

I will try to compile with new installer !!!

Mauro Rossi

unread,
Apr 27, 2015, 9:34:38 AM4/27/15
to andro...@googlegroups.com
Hi,
I am going to test with lollipop-x86 too,
just a question is this patch tackling with ext4 current limitation that it is not possible to format and install grub with former installer?

Thanks for the information, it would be helpful for installing a working lollipop-x86 system.

Mauro

hatharry

unread,
Apr 27, 2015, 10:01:31 AM4/27/15
to andro...@googlegroups.com
This commit should of added ext4 formatting.

The installer installs on gpt ext4 and adds grub2 to the efi partition. The menus should be easy to follow. skip legacy grub then say yes to EFI grub2.

rbg

unread,
Apr 28, 2015, 2:23:58 AM4/28/15
to andro...@googlegroups.com
should this be applicable for Lollipop????

rbg@Ubuntu-14:~/x86-5.1-apr27/bootable$ ls
0001-gpt_grub2.patch  newinstaller  recovery
rbg@Ubuntu-14:~/x86-5.1-apr27/bootable$ git apply -v --check 0001-gpt_grub2.patch
fatal: git diff header lacks filename information when removing 1 leading pathname component (line 420)

rbg@Ubuntu-14:~/x86-5.1-apr27/bootable$ git apply -v 0001-gpt_grub2.patch
fatal: git diff header lacks filename information when removing 1 leading pathname component (line 420)

414 create mode 100644 install/lib/libgcc_s.so.1
415create mode 100755 install/lib/libstdc++.so.6
416
417 diff --git a/install/bin/cgdisk b/install/bin/cgdisk
418 new file mode 100755
419 index 0000000000000000000000000000000000000000..81e72e457377bd638c13f2d185766a28d98115ed
420 GIT binary patch
421 literal 174264
422 zcmdSCe|%KM)dzeN5?COxQKLnr8Wj~4H3%vce?(;!D(LbfN~;(U0t@oXWEZd%2yP;5

hatharry

unread,
Apr 28, 2015, 3:41:49 AM4/28/15
to andro...@googlegroups.com
i think i made a mistake earlier saying 'bootable' was the git root when in fact 'bootable/newinstaller' is the root

try:

cd bootable/newinstaller
git apply -ignore-whitespace *.patch

rbg

unread,
Apr 28, 2015, 5:36:17 AM4/28/15
to andro...@googlegroups.com
well meld diff on kitkat vs lollipop bootable only shows that lollipop has a additional recovery folder,
everything else is identical...................

still see the same issue..........??????????

will try applying it to the kitkat bootable..........

hatharry

unread,
Apr 28, 2015, 5:52:02 AM4/28/15
to andro...@googlegroups.com

rbg

unread,
Apr 28, 2015, 6:22:20 AM4/28/15
to andro...@googlegroups.com
nope tried that a while ago........will leave it to the "experts"

Mauro Rossi

unread,
Apr 28, 2015, 8:04:53 AM4/28/15
to andro...@googlegroups.com
If the problem is related to DOS line feed + carriage return,
the command to convert to unix in Ubuntu is:

fromdos filename.patch

M.

rbg

unread,
Apr 28, 2015, 1:47:01 PM4/28/15
to andro...@googlegroups.com
thanks Mauro....

rbg

unread,
Apr 28, 2015, 7:49:57 PM4/28/15
to andro...@googlegroups.com
turns out fromdos -d filename.patch does the trick for me........

then after fumbling around and finally realizing that there is really only one NOT three patch files
that need to be applied....I was able to end up with a meld diff on the KitKat newinstaller vs Lollipop newinstaller
where they are both identical...........

so we'll move on to access a couple builds........

thanks hatharry / Mauro for the guidance



On Tuesday, April 28, 2015 at 8:04:53 AM UTC-4, Mauro Rossi wrote:

rbg

unread,
Apr 28, 2015, 7:55:39 PM4/28/15
to andro...@googlegroups.com
yes bootable/newinstaller was correct...your right


On Tuesday, April 28, 2015 at 3:41:49 AM UTC-4, hatharry wrote:
Message has been deleted

rbg

unread,
Apr 29, 2015, 1:42:24 PM4/29/15
to andro...@googlegroups.com
a patched newinstaller folder is available for those who "roll their own" builds...

Joan R. Serra

unread,
Apr 29, 2015, 1:56:32 PM4/29/15
to andro...@googlegroups.com
Many Thanks rbg !!!

--
You received this message because you are subscribed to a topic in the Google Groups "Android-x86" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-x86/WwH8jQAvFGQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-x86...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-x86.
For more options, visit https://groups.google.com/d/optout.



--
Joan R. Serra

TBD

unread,
Apr 29, 2015, 8:53:00 PM4/29/15
to andro...@googlegroups.com
Ya I'd get right on that but.....

TBD

On 4/29/2015 12:40 PM, rbg wrote:
a patched newinstaller folder is available for those who would like to "rool their own" build.....
--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-x86...@googlegroups.com.

rbg

unread,
Apr 30, 2015, 1:23:21 PM4/30/15
to andro...@googlegroups.com
TEST BUILDS AVAILABLE

These builds include "An Updated Installer for Android-x86, by hatharry

      ---- FOR TESTING PURPOSES ONLY----

********************************************************************
WARNING: be advised that:
 - These changes may contain bugs that could DAMAGE your hardware and/or cause DATA LOSS.

 - The iso was simply tested for boot and a couple things checked...
 - The updated installer is untested...

Use it AT YOUR OWN RISK. YOU WERE ADVISED
********************************************************************

Developer feedback is welcomed





On Tuesday, April 28, 2015 at 7:49:57 PM UTC-4, rbg wrote:

hashirt

unread,
Apr 30, 2015, 3:36:34 PM4/30/15
to andro...@googlegroups.com
May I ask what's new/changed with the new installer?

30 Nisan 2015 Perşembe 20:23:21 UTC+3 tarihinde rbg yazdı:

hatharry

unread,
May 1, 2015, 9:12:14 AM5/1/15
to andro...@googlegroups.com
New installer can edit and install to GPT partitions.

Chih-Wei Huang

unread,
May 4, 2015, 4:16:24 AM5/4/15
to Android-x86
Sorry for reply late!

I have concern to put the (full?) grub2 efi packages
to the source tree.
Actually we already have the grub2-efi binaries
under bootable/newinstaller/boot/efi/boot/
Wouldn't it be enough?

You also put several executables under
install/bin/, but seems only cgdisk is used?
Could the others be removed?
Basically speaking I hope to keep it small
as possible.

Except that, it's a great work.
Thank you for the contribution.


--
Chih-Wei
Android-x86 project
http://www.android-x86.org

hatharry

unread,
May 4, 2015, 7:42:23 AM5/4/15
to andro...@googlegroups.com
After digging deep into what is needed, I have removed all unneeded files.

Please checkout newinstaller, then apply patch.
0001-lightweight-gpt-support.patch

Chih-Wei Huang

unread,
May 4, 2015, 9:57:53 PM5/4/15
to Android-x86
2015-05-04 19:42 GMT+08:00 hatharry <hath...@gmail.com>:
> After digging deep into what is needed, I have removed all unneeded files.
>
> Please checkout newinstaller, then apply patch.

The patch looks better.
I'm testing now.
Thank you!

Chih-Wei Huang

unread,
May 8, 2015, 8:27:25 AM5/8/15
to Android-x86
2015-05-05 9:57 GMT+08:00 Chih-Wei Huang <cwh...@android-x86.org>:
> 2015-05-04 19:42 GMT+08:00 hatharry <hath...@gmail.com>:
>> After digging deep into what is needed, I have removed all unneeded files.
>>
>> Please checkout newinstaller, then apply patch.
>
> The patch looks better.
> I'm testing now.

Some issues in this patch:

* MBR disks are duplicate because
both fdisk and blkid list them.
* blkid can't recognize new created
unformatted partition
* cmdline in grub.cfg is hardcoded
* can't handle emmc disk
* mkdosfs doesn't work due to
parameter error

Saying that, this is still a good patch to
address the request many users asked.
Thank you for the great contribution!

To solve the above issue, I made the changes:
* scan /sys/block/ directly and use blkid
to get known fs type
* generate cmdline in grub.cfg on-fly
* other miscellaneous improvements

The patch has been pushed to the kitkat-x86 branch.
Will merge to lollipop-x86 later after I tested.

Joan R. Serra

unread,
May 10, 2015, 3:02:02 AM5/10/15
to andro...@googlegroups.com
Many Thanks RBG !!!

Tested android_x86-5.1.0_r3-NewInstaller-20150501.img on UEFI and GPT disk, android 5.0.1 installed on an existing partition without problems !!!

rbg

unread,
May 22, 2015, 2:50:18 PM5/22/15
to andro...@googlegroups.com

rbg

unread,
May 23, 2015, 3:25:25 AM5/23/15
to andro...@googlegroups.com
since there have been "adjustments" to the newinstaller since my original post, the Lollipop NewInstaller
builds have been updated.....
Reply all
Reply to author
Forward
0 new messages