Booting from internal storage via chroot to /data

Linux development for the Acer A500/A501

Re: Booting from internal storage via chroot to /data

Postby Angelelz » 16 Oct 2013, 03:13

digetx » 15 Oct 2013, 17:40 wrote:Add a dash for "tar -xzvpf", which seems to be missed.


That doesn't seem to be the problem, I'm having exactly the same issue.

Still trying to work it out...
User avatar
Angelelz
Helpful Owner
 
Posts: 52
Joined: 07 Feb 2012, 22:26
Reputation point: 4
Junior Owner

Re: Booting from internal storage via chroot to /data

Postby Angelelz » 16 Oct 2013, 06:28

I don't know what else to do, should I flash the kernel_update from Thor's post?
I've edited menu.skrilax (as it says "ALERT! /dev/mmcblk0p8 doen not exist. Dropping to shell") but it doesn't seem to be the problem.
I'm starting to think initramfs script is not working correctly for me, it doesn't seem to be mounting the devices it should, but I have no idea how to change it o what to change, do I need a linux pc? What should I look for?
User avatar
Angelelz
Helpful Owner
 
Posts: 52
Joined: 07 Feb 2012, 22:26
Reputation point: 4
Junior Owner

Re: Booting from internal storage via chroot to /data

Postby blackthund3r » 22 Oct 2013, 22:32

Angelelz » 16 Oct 2013, 05:28 wrote:I don't know what else to do, should I flash the kernel_update from Thor's post?
I've edited menu.skrilax (as it says "ALERT! /dev/mmcblk0p8 doen not exist. Dropping to shell") but it doesn't seem to be the problem.
I'm starting to think initramfs script is not working correctly for me, it doesn't seem to be mounting the devices it should, but I have no idea how to change it o what to change, do I need a linux pc? What should I look for?

You seem to have a very strange issue. I have two ideas...

1) Have you ever used 'babsector' or another unbricking tool that edits the partition table? These tools add extra partitions, and it's possible that Linux is seeing this extra partition which is skewing the numbering system; this would make the data partition mmcblk0p9 rather than mmcblk0p8...
2) It seems thor has changed the kernel recently and the way the modules are loaded appears to be very different. I will need to speak to him about incorporating these updates into this installation method; I was not able to boot Lubuntu with the published kernel update. I can happily post the zImage that I'm using but this doesn't solve the issue in the long run; I'd rather we were all able to use the latest published files with, which is quite overtly, a hacked way of installing Linux on this tablet.

In the time being, assuming #1 isn't the case, use an older version of the zImage and the latest published Lubuntu build (v1??). You should not have to flash anything in ClockworkMod recovery, and there is no need for an external MicroSD card, hence the purpose of this post.

I hope this helps, and I'll let you know if anything changes that will help.
~ @blackthund3r (Christopher)
Did I make myself useful? Feel free to rep!!

(reps make meh happeh)

http://acerhacks.com <----- A500 hacking FAQs (new link). Check there first! :)
Image

http://acerhacks.com/sbkcalc/ <--- Get that SBK!

-------------

Acer Iconia Tab A500 16GB
Skrilax v9 ICS bootloader
TegraOwners 4.2.2 Jellybean ROM
-----
Also runs Lubuntu 13.04 booting from /data/linux via the FlexROM :)
User avatar
blackthund3r
Guru Owner
 
Posts: 565
Joined: 21 Jan 2012, 15:00
Location: UK
Reputation point: 24
Junior Owner

Re: Booting from internal storage via chroot to /data

Postby Angelelz » 23 Oct 2013, 05:17

blackthund3r » 22 Oct 2013, 16:02 wrote:
Angelelz » 16 Oct 2013, 05:28 wrote:I don't know what else to do, should I flash the kernel_update from Thor's post?
I've edited menu.skrilax (as it says "ALERT! /dev/mmcblk0p8 doen not exist. Dropping to shell") but it doesn't seem to be the problem.
I'm starting to think initramfs script is not working correctly for me, it doesn't seem to be mounting the devices it should, but I have no idea how to change it o what to change, do I need a linux pc? What should I look for?

You seem to have a very strange issue. I have two ideas...

1) Have you ever used 'babsector' or another unbricking tool that edits the partition table? These tools add extra partitions, and it's possible that Linux is seeing this extra partition which is skewing the numbering system; this would make the data partition mmcblk0p9 rather than mmcblk0p8...
2) It seems thor has changed the kernel recently and the way the modules are loaded appears to be very different. I will need to speak to him about incorporating these updates into this installation method; I was not able to boot Lubuntu with the published kernel update. I can happily post the zImage that I'm using but this doesn't solve the issue in the long run; I'd rather we were all able to use the latest published files with, which is quite overtly, a hacked way of installing Linux on this tablet.

In the time being, assuming #1 isn't the case, use an older version of the zImage and the latest published Lubuntu build (v1??). You should not have to flash anything in ClockworkMod recovery, and there is no need for an external MicroSD card, hence the purpose of this post.

I hope this helps, and I'll let you know if anything changes that will help.


I can't believe it! finaly, I'm happy to announce that I've been able to boot lubuntu on my A500!
Idea N1 was not the problem, during this few days I tried everything, including checking the partition table, but that wasn't the problem.

I did two things, changed the zImage as you suggested and then gave every file in flex partition premissions for everything! So I guess everyone using your guide should be aware! and you should edit your guide (my opinion) so everyone uses update-kernel-3.8.13.7.zip, at least until you talk to thor and digetx about this zImage issues.

Thanks mate! You're the man!

BTW, once installer finished, it asked me to upgrade to ubuntu 13.10, I should say no to that, right?
User avatar
Angelelz
Helpful Owner
 
Posts: 52
Joined: 07 Feb 2012, 22:26
Reputation point: 4
Junior Owner

Re: Booting from internal storage via chroot to /data

Postby monosoul » 08 Nov 2013, 10:02

So, what about modules? I've installed modules from update_native_3.8.13.11.zip. But where should I get modules for kernel 3.8.13.7?
User avatar
monosoul
Junior Owner
 
Posts: 1
Joined: 05 Aug 2013, 16:18
Reputation point: 0
Junior Owner

Re: Booting from internal storage via chroot to /data

Postby digetx » 08 Nov 2013, 14:16

It would be cool if someone could tell/send patch for what modules should be changed to built-in. I'll review kernel config for 13.12 update, but not going to test such use-cases.
User avatar
digetx
Dev Team
 
Posts: 4220
Joined: 06 Dec 2011, 00:56
Location: Moscow
Reputation point: 482
Junior OwnerJunior OwnerJunior OwnerJunior OwnerJunior Owner

Re: Booting from internal storage via chroot to /data

Postby digetx » 03 Dec 2013, 19:39

I made init for initramfs that will mount, chroot and run rootfs init. Tested with android boot img and linaro-ubuntu rootfs on data partition in /linux dir. You need to use kernel with CONFIG_DEVTMPFS enabled, ie recent kernel update.

Compile with "armv7a-hardfloat-linux-gnueabi-gcc init.c -static -o init". Precompiled attached to this post.

Code: Select all
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <sys/mount.h>

#define ROOT_DEVICE "/dev/mmcblk0p8"
#define ROOT_DIR "/linux"

int main(int argc, char *argv[])
{
   int ret;

   printf("INIT: mount /dev\n");
   ret = mount(NULL, "/dev", "devtmpfs", 0, "mode=0755");
   if (ret != 0)
      goto error;

   printf("INIT: mount /root\n");
   ret = mount(ROOT_DEVICE, "/root", "ext4", 0, NULL);
   if (ret != 0)
      goto error;

   printf("INIT: umount /dev\n");
   ret = umount("/dev");
   if (ret != 0)
      goto error;

   printf("INIT: chrooting\n");
   ret = chroot("/root" ROOT_DIR);
   if (ret != 0)
      goto error;

   printf("INIT: mount /\n");
   ret = mount("/", "/", "rootfs", MS_BIND, NULL);
   if (ret != 0)
      goto error;

   printf("INIT: run rootfs init\n");
   ret = execv("/sbin/init", argv);

error:
   fprintf(stderr, "INIT ERROR: %s\n", strerror(errno));

   return ret;
}
You do not have the required permissions to view the files attached to this post.
User avatar
digetx
Dev Team
 
Posts: 4220
Joined: 06 Dec 2011, 00:56
Location: Moscow
Reputation point: 482
Junior OwnerJunior OwnerJunior OwnerJunior OwnerJunior Owner

Re: [WIP] Booting from internal storage via chroot to /data

Postby kronflux » 18 Mar 2014, 00:31

blackthund3r » 15 Aug 2013, 04:39 wrote:Okay here is my premade ramdisk for booting from /data/linux.
http://adf.ly/U1cn3


This link doesn't work, says the file has been deleted.
Any chance of a mirror? really hoping to get this all set up, and I don't fully understand the main lubuntu post. your instructions are very easy to follow, but I'm at the step where I need your files to stick into my flexrom.
User avatar
kronflux
Junior Owner
 
Posts: 14
Joined: 16 Nov 2013, 17:17
Location: Edmonton, AB
Reputation point: 0
Junior Owner

Re: Booting from internal storage via chroot to /data

Postby lunhilion » 30 May 2014, 18:23

please blackthunder, can you relink this? http://adf.ly/U1cn3
User avatar
lunhilion
Junior Owner
 
Posts: 2
Joined: 08 Apr 2014, 22:27
Reputation point: 0
Junior Owner

Re: Booting from internal storage via chroot to /data

Postby blackthund3r » 23 Oct 2014, 12:05

Sorry for the huge delay! I didn't see these posts....

I have reuploaded the initramfs :)

-Chris
~ @blackthund3r (Christopher)
Did I make myself useful? Feel free to rep!!

(reps make meh happeh)

http://acerhacks.com <----- A500 hacking FAQs (new link). Check there first! :)
Image

http://acerhacks.com/sbkcalc/ <--- Get that SBK!

-------------

Acer Iconia Tab A500 16GB
Skrilax v9 ICS bootloader
TegraOwners 4.2.2 Jellybean ROM
-----
Also runs Lubuntu 13.04 booting from /data/linux via the FlexROM :)
User avatar
blackthund3r
Guru Owner
 
Posts: 565
Joined: 21 Jan 2012, 15:00
Location: UK
Reputation point: 24
Junior Owner

Re: Booting from internal storage via chroot to /data

Postby atrieder » 10 Sep 2015, 01:56

Hi, I am trying to follow this guide, but the link to the ramdisk does not work (http://adf.ly/tB1OK). Can you reupload the initramfs file?
User avatar
atrieder
Junior Owner
 
Posts: 3
Joined: 19 Dec 2011, 03:26
Reputation point: 0
Junior Owner

Re: Booting from internal storage via chroot to /data

Postby s1n4o » 31 Mar 2017, 10:41

The links to initramfs are not working. Are they still available somewhere? :)
User avatar
s1n4o
Junior Owner
 
Posts: 1
Joined: 12 Nov 2016, 11:42
Reputation point: 0
Junior Owner

Re: Booting from internal storage via chroot to /data

Postby digetx » 04 Apr 2017, 20:35

I don't have that file, but the tools to make your own are all available :)
User avatar
digetx
Dev Team
 
Posts: 4220
Joined: 06 Dec 2011, 00:56
Location: Moscow
Reputation point: 482
Junior OwnerJunior OwnerJunior OwnerJunior OwnerJunior Owner

Re: Booting from internal storage via chroot to /data

Postby BatyaMedic » 08 May 2017, 14:37

How can i create my own initramfs and where i can find zImage file?
User avatar
BatyaMedic
Junior Owner
 
Posts: 1
Joined: 06 Sep 2014, 16:26
Reputation point: 0
Junior Owner

Previous

Return to Acer A500/A501 Linux

Who is online

Users browsing this forum: No registered users and 1 guest

x

#{title}

#{text}