[MOD] Full Ubuntu on the Atrix (now fully automated: 4.1.26/4.1.52)

Status
Not open for further replies.

Sogarth

Retired Recognized Developer
Jan 14, 2006
503
361
0
I am on AT&T. I will run this and report back.
Okay. If you do find that X isn't starting and that /osh is empty, get a root terminal somehow (using adb, if it works, or Android Terminal Emulator, if it doesn't) and do the following:
  • First, make sure that /system/bin/mountosh.orig is there: ls /system/bin/mountosh.orig
  • Move the original mountosh back: mv /system/bin/mountosh.orig /system/bin/mountosh
  • Reboot: reboot
After these steps, you should be back to using the stock Ubuntu installation.
 

tonman23

Member
Oct 30, 2010
48
1
0
Okay. If you do find that X isn't starting and that /osh is empty, get a root terminal somehow (using adb, if it works, or Android Terminal Emulator, if it doesn't) and do the following:
  • First, make sure that /system/bin/mountosh.orig is there: ls /system/bin/mountosh.orig
  • Move the original mountosh back: mv /system/bin/mountosh.orig /system/bin/mountosh
  • Reboot: reboot
After these steps, you should be back to using the stock Ubuntu installation.
I can't find a free loopback device?

# /sbin/losetup /dev/block/loop7
/sbin/losetup /dev/block/loop7
/dev/block/loop7: [b312]:26 (c220b83ae2fef0c024d6aaaedc1372dd)
# /sbin/losetup /dev/block/loop6
/sbin/losetup /dev/block/loop6
/dev/block/loop6: [b312]:22 (f282eaf309aab3c58a4812ab76812126)
# /sbin/losetup /dev/block/loop5
/sbin/losetup /dev/block/loop5
/dev/block/loop5: [b312]:25 (d6ff19a29138895404662d7dff7bfd7a)
# /sbin/losetup /dev/block/loop4
/sbin/losetup /dev/block/loop4
/dev/block/loop4: [b312]:28 (c563c01fe809a053d5801c99e55ac8cf)
# /sbin/losetup /dev/block/loop3
/sbin/losetup /dev/block/loop3
/dev/block/loop3: [b312]:29 (f9672f198e589a02c9d738b01516be84)
# /sbin/losetup /dev/block/loop2
/sbin/losetup /dev/block/loop2
/dev/block/loop2: [b312]:27 (7b437dd3fc4c166018ac49cc9006a01d)
# /sbin/losetup /dev/block/loop1
/sbin/losetup /dev/block/loop1
/dev/block/loop1: [b312]:23 (088ffe4aba111a31f89de6ddb1eb1be2)
# /sbin/losetup /dev/block/loop0
/sbin/losetup /dev/block/loop0
/dev/block/loop0: [b312]:30 (b21057058a9b2e446ee1175dd53b2c67)
 

Sogarth

Retired Recognized Developer
Jan 14, 2006
503
361
0
I can't find a free loopback device?

# /sbin/losetup /dev/block/loop7
/sbin/losetup /dev/block/loop7
/dev/block/loop7: [b312]:26 (c220b83ae2fef0c024d6aaaedc1372dd)
... <snip ...
Wow.

Then again, I should probably take a look at losetup's man page. What does this return? It should tell you if there are any free loopback devices at all.
  • /sbin/losetup -f

If it tells you there are no free loopback devices, if you reboot your device, do you still have /sbin/losetup -f telling you there are none available?

If so, we might have a problem, since we can't force a reload of the loop module (which would be the standard way of creating more loopback devices after tweaking modprobe.conf - although maybe we can change it and reboot?).
 

tonman23

Member
Oct 30, 2010
48
1
0
Wow.

Then again, I should probably take a look at losetup's man page. What does this return? It should tell you if there are any free loopback devices at all.
  • /sbin/losetup -f

If it tells you there are no free loopback devices, if you reboot your device, do you still have /sbin/losetup -f telling you there are none available?

If so, we might have a problem, since we can't force a reload of the loop module (which would be the standard way of creating more loopback devices after tweaking modprobe.conf - although maybe we can change it and reboot?).
even after a reboot:

# /sbin/losetup -f
/sbin/losetup -f
losetup: could not find any free loop device
 

t0dbld

Senior Member
Mar 21, 2010
457
1,485
0
Michigan
Wow.

Then again, I should probably take a look at losetup's man page. What does this return? It should tell you if there are any free loopback devices at all.
  • /sbin/losetup -f

If it tells you there are no free loopback devices, if you reboot your device, do you still have /sbin/losetup -f telling you there are none available?

If so, we might have a problem, since we can't force a reload of the loop module (which would be the standard way of creating more loopback devices after tweaking modprobe.conf - although maybe we can change it and reboot?).
speaking of loops , i have not had much time to look at this part of atrix as of late , could we not mount and loop the sd card for the storage aka home dir and jsut use limited phone storage for the Ubuntu distro ?
 

Sogarth

Retired Recognized Developer
Jan 14, 2006
503
361
0
even after a reboot:

# /sbin/losetup -f
/sbin/losetup -f
losetup: could not find any free loop device
... What the hell do you have running on that thing? :eek:

Okay, this'll have to wait until I get home, then, when I'll be able to take a look at what it takes to create additional loop devices (although there's no guarantee that something else on your device won't eat those up too! ;)).
 

Sogarth

Retired Recognized Developer
Jan 14, 2006
503
361
0
even after a reboot:

# /sbin/losetup -f
/sbin/losetup -f
losetup: could not find any free loop device
Actually... if you're willing to try one more experiment, this might do it.

You currently have 10 apps on your internal storage (or the Media area, as Manage applications calls it). Would you be willing to take the 3 smallest and move it to back to the phone? If my guess is right, that should free up one of the 8 loop devices.
 

tonman23

Member
Oct 30, 2010
48
1
0
... What the hell do you have running on that thing? :eek:

Okay, this'll have to wait until I get home, then, when I'll be able to take a look at what it takes to create additional loop devices (although there's no guarantee that something else on your device won't eat those up too! ;)).


Sent from my MB860 using XDA Premium App




No problem!
 

Sogarth

Retired Recognized Developer
Jan 14, 2006
503
361
0
speaking of loops , i have not had much time to look at this part of atrix as of late , could we not mount and loop the sd card for the storage aka home dir and jsut use limited phone storage for the Ubuntu distro ?
The Ubuntu home directory actually doesn't use that much space (I guess unless you surf an awful lot on the full Firefox?) and it's stored in /data. I suppose it would be possible to pull some stunts to have some of that kept outside of /data, but since it's not that large, there isn't much benefit. The other major user of /data is the Android OS (for downloaded applications and application data), and there isn't much we can do about that.
 

t0dbld

Senior Member
Mar 21, 2010
457
1,485
0
Michigan
The Ubuntu home directory actually doesn't use that much space (I guess unless you surf an awful lot on the full Firefox?) and it's stored in /data. I suppose it would be possible to pull some stunts to have some of that kept outside of /data, but since it's not that large, there isn't much benefit. The other major user of /data is the Android OS (for downloaded applications and application data), and there isn't much we can do about that.
hmm, well that must be because of it running from xserve, on my other machines i always create another partition for my /home dir aka everything not the distro, that also enables me to update or change Ubuntu distro with out loosing data or settings
 

Sogarth

Retired Recognized Developer
Jan 14, 2006
503
361
0
hmm, well that must be because of it running from xserve, on my other machines i always create another partition for my /home dir aka everything not the distro, that also enables me to update or change Ubuntu distro with out loosing data or settings
Yeah, on a desktop that makes sense. As I said, though, they've already done that here - /home is a symlink to /data/home, and /osh/home has little data in it (possibly the defaults to populate /data/home with).
 
  • Like
Reactions: molotof

molotof

Senior Member
Apr 26, 2007
51
10
0
Virginia
Thank you !!!

I just want to thank you for what you did as it blows my mind on how you got to make the atrix fly free as it was supposed to be ! I think this going to make the atrix the best all in one solution for most people, thank you again and keep up the good work !

your batch file script is very nice and clean! i have not tried it yet but will do when i get some time and give you feed back on what might come up.
 

Sogarth

Retired Recognized Developer
Jan 14, 2006
503
361
0
Actually... if you're willing to try one more experiment, this might do it.
Confirmed.

You currently have 10 apps on your internal storage (or the Media area, as Manage applications calls it). Would you be willing to take the 3 smallest and move it to back to the phone? If my guess is right, that should free up one of the 8 loop devices.
Each app moved to the "Media area" takes up a loopback device. So, the script can't run if you have 8 or more apps moved there. I'm guessing that Android handles the shuffling between the various lopback devices when you swap between them. It wouldn't surprise me if Android won't allow you to run all of those devices simultaneously, since it doesn't have the resources to let that happen. ;)

On the bright side, though, the filesystem file gets mounted in init.rc before the apps do, so even with 8+ apps, they don't interfere with this once it's installed. I'll update the first post with appropriate instructions, and I'll update the script as well so that it checks that /dev/block/loop7 is free before trying to use it.
 
Last edited:

tonman23

Member
Oct 30, 2010
48
1
0
Confirmed.


Each app moved to the "Media area" takes up a loopback device. So, the script can't run if you have 8 or more apps moved there. I'm guessing that Android handles the shuffling between the various lopback devices when you swap between them. It wouldn't surprise me if Android won't allow you to run all of those devices simultaneously, since it doesn't have the resources to let that happen. ;)

On the bright side, though, the filesystem file gets mounted in init.rc before the apps do, so even with 8+ apps, they don't interfere with this once it's installed. I'll update the first post with appropriate instructions, and I'll update the script as well so that it checks that /dev/block/loop7 is free before trying to use it.
Half asleep right now. Will try this while at work in the morning and report back. Learned a lot today lol.

Thanks

Sent from my MB860 using XDA Premium App
 

Sogarth

Retired Recognized Developer
Jan 14, 2006
503
361
0
Version 0.7.2 uploaded to address a couple of holes. It also sets up a very permissive (i.e. allows everything) TOMOYO Linux. If you've already installed a previous version, you can effectively disable TOMOYO by performing the following commands as root:

  • rm osh/etc/tomoyo/exception_policy.conf
  • touch osh/etc/tomoyo/exception_policy.conf
  • rm osh/etc/tomoyo/domain_policy.conf
  • touch osh/etc/tomoyo/domain_policy.conf
Followed by a reboot. TOMOY Linux will load, but will monitor nothing.
 

SS2006

Senior Member
Aug 23, 2008
1,641
105
0
London, Ontario
i havent tried this yet. and im not a linux expert but u say

"If this succeeds, we can move on to running aptitude:
aptitude"

how does one run aptitude exactly once i get to this step

thanks
 

zen kun

Senior Member
Jan 23, 2010
1,874
387
0
Mexico City
forum.xda-developers.com
Quick question I'm op says you can soft brick the device,i don't care if I can restore again using sbf file, so I can restore the device in. case of brick? Or any chance we will never restore?i know always be a chance but what's your opinion guys and btw really nice work tho

.......................................................
Sent from my loved nexus one ;D
 

tonman23

Member
Oct 30, 2010
48
1
0
Confirmed.


Each app moved to the "Media area" takes up a loopback device. So, the script can't run if you have 8 or more apps moved there. I'm guessing that Android handles the shuffling between the various lopback devices when you swap between them. It wouldn't surprise me if Android won't allow you to run all of those devices simultaneously, since it doesn't have the resources to let that happen. ;)

On the bright side, though, the filesystem file gets mounted in init.rc before the apps do, so even with 8+ apps, they don't interfere with this once it's installed. I'll update the first post with appropriate instructions, and I'll update the script as well so that it checks that /dev/block/loop7 is free before trying to use it.
Everything went smooth today!


Thanks for working on this with me
 

Ririal

Retired Recognized Developer
Feb 21, 2011
785
393
0
Grayslake
www.rirnef.net
Quick question I'm op says you can soft brick the device,i don't care if I can restore again using sbf file, so I can restore the device in. case of brick? Or any chance we will never restore?i know always be a chance but what's your opinion guys and btw really nice work tho

.......................................................
Sent from my loved nexus one ;D
Soft brick means you can restore.

Hard brick means you have a shiny paperweight.
 
Status
Not open for further replies.