[Crazy Talk] Boot.... from ram? >:) - Phoenix OS News, Q&A & Development

ok, so i use this for pubg on a laptop. the harddrive is so slow, but the laptop has 16gb of ram.
with an 8gb data partition, the whole of the PhoenixOS is about 10gb, that leaves the system 6gb to use, more than most android devices.
things like ubuntu and gparted can boot from ram. so i kinda started researching the concept, and decided i needed some help. anyone interested?
ideally it would boot to grub then copy an image to ram (containing all of PhoenixOS) then afterwards, when shutting down android, update the image on the harddrive assuming no power failures
ubuntu uses squashfs right? and from what ive read loads everything to ram in initrd.gz. is there an equivalent to that androidx86?
can we accompish this from grub?

Seems interesting . I extracted the initrd.img and found that the init file is actually sh a script . It runs in a busybox shell . So probably you could modify the script at the start and probably create a /dev/ram* block device and copy the contents of your PhoenixOS partition/image to the created ramdisk .

Related

Running android from partitions on SD card

What i did was:
partition my sd card like so: i53.tinypic.com/14scy7q.png
using shubcraft 1.5_stock cyanogenmod
clone contents of rootfs.img to the 32MB partition there
clone contents of system.ext2 to the 200MB partition there
cp -ar shubcraft/media/* to data partition
cp -ar shubcraft/root/*.* to 32MB partition
cp -ar shubcraft/root/system/* to 200MB partition
edit initrd init script like so: codepad.org/HL4KDDrp
repackage initrd into this: multiupload.com/2H9069V3DF
i think so far this is good
edit rootfs init script like so: codepad.org/G81KrGMN
recompile kernel with ext4 support
put zImage, new initrd.gz clrcad.exe haret.exe and startup.txt, now i can put them anywhere, even on internal memory, because the kernel and initrd get loaded right away anyway, but i put it on sd, doesnt matter.
now, the first thing i notice is that all those commands between ==== tweaks ==== in the rootfs init script fail because the directories arent there.
then, the buttons on the bottom (other than lock screen button) don't work, probably because theyre using some patches for the buttons, that i didnt include in my kernel compile (even though i just used r10 kernel from github and then edits that were linked in that thread (source.zip))
it also seems to be running more slowly than with files, what gives ?
i ask someone experienced with android to link me to the correct patches, and maybe fix any problems in my initscripts if there are any (why do the tweaks fail ?)
booting with ext4 partitions:
booting normally:

[TUTORIAL] A BETTER Ubuntu on Android method

As many of you have probably heard, you can load Ubuntu along side your Android OS. This has been confirmed on many devices, including N1, Desire, and Incredible. Here is the nexusonehacks post describing how to do it.
But I have found a better way to do it. Normally you mount ubuntu.img as a loopback and run from that. The problem with this is that is has very limited space (250mb or so) as you cannot exceed the size of the .img.
My method is to extract the contents of the .img and run it directly from the sdcard's filesystem.
Please be aware that if you use ClockworkMod Recovery, it will try to backup our new EXT2 partition! It thinks its an app-to-sd partition! I've yet to figure a way around this. Do not follow this tutorial if you make nandroids!
Requirements
- ubuntu.img (must be an ARM port)
- A Linux distro so you can 'cp' to your sdcard
- You will have to make a second partition on sdcard, ext2 type
- Patience and experience. This guide assumes you already know the basics of how to work with Linux
Step 1 Create the partition on sdcard
- Open your Linux distro and insert your sdcard (or enable disk drive on phone)
- Start GParted (or similar) and create an ext2 partition on your card. The partition should be as big as ubuntu.img. I recommend atleast 25% bigger so you have room to install packages and whatnot. FAT32 or NTFS will not work here!
Step 2 Mount ubuntu.img
- Mount ubuntu.img with the following commands (on the Linux distro, not phone):
Code:
sudo su
mkdir /mnt
mkdir /mnt/ubuntu
cd [B]/path/to/ubuntu/image[/B] **IMPORTANT!
mount -t ext2 -o loop ubuntu.img /mnt/ubuntu
Step 3 Copy contents of ubuntu.img to sdcard
- Make sure your new ext2 partition is mounted. We will assume its at /media/ext2sd
- Copy the contents. This will take a very long time depending on speed of card. Mine took roughly 70 minutes
Code:
cp -dRP --preserve=all /mnt/ubuntu/* /media/ext2sd/
Step 4 Update bootubuntu script
Here is a rundown of the modified script:
- Mount root as r/w
- Ensure /mnt/sdcard2 exists
- Mount the second sdcard partition
- Everything else, including chrooting to start Ubuntu! I use 'nice' to lower the priority of chroot so it won't make phone sluggish. Change this if you want.
Download the script
Step 5 Get Ubuntu running
- From here out its the same as any other tutorial. do a 'sh ubuntu.sh' to copy files to phone, then 'bootubuntu' to start it. Hopefully everything goes good for you! You now have much more room to do things!
Reserved..
Is it possible to use ext3/4 and would there be any performance gains?
ext3/ext4 use journaling. Unless you know for sure that your sdcard does wear-leveling, I would not advise using these as they may degrade the life of your card quickly. Another option would be to specifically make the partition without these options, but there is little to no performance gain as sdcards are already slow.

increase the interior phone storage

hi everyone,
I am using mattc evoleo build and it is really great.
but I am almost out of space so I need to increase the interior phone storage from 1 GB to 2 GB.
can you show me the proper way to increase it or a data file I can replace to do so ????!!!
Kev007 posted this a while back
Manually edit data.img if you want a different size or use a different build!
I wrote this tutorial using a European HD2, 8GB microSD card, DarkStone's Froyo_v1 and a laptop running Ubuntu 10.04, your experience may vary.
Requirements:
* Desktop/Laptop running some form of Linux.
IMPORTANT NOTE: Both, a PC and a Mac, can resize the .img file but not modify (specifically - run resize2fs) the ext2 file system that Android uses. I was in a hurry to post the resizing instructions and didn't fully test the procedure on a PC. Currently, this procedure is only possible on a Linux based operating system. I apologize if your time was wasted.
* data.img file
* HD2, microSD card, microUSB cable etc, etc (you might be better off using a card reader)
--------------------------------------------(Running Linux)----------------------------------------------
Procedure:
1. UnZip Android or your present data.img file to your Home Folder. Or a folder of your liking (or even on your memory card!), just remember to cd before you do the following:
2. Open Terminal and Copy&Paste (Ctrl+C, Ctrl+Shift+V) this:
Code:
dd if=/dev/zero bs=1M count=XXX >> data.img
where XXX is the amount, in MB, by which data.img should be increased by.
My filesize started out as 256MB and I wanted a total of 512MB. That would mean I needed a extra 256MB, so I executed this:
Code:
dd if=/dev/zero bs=1M count=256 >> data.img
3. Run a file system check and file system resizer
Code:
e2fsck -f data.img
resize2fs data.img
e2fsck -f data.img
if prompted, press "y" for "yes"
4. Copy all of the Android files onto your SD card, put it into your phone, and run CLRCAD.exe and HARET.exe!
-----------------------------------------------TIPS!-------------------------------------------------
Don't know how to cd?
If you're running a modern build of Linux you can just mount your SD card (phone or cardreader), open File Browser and paste "dd if=/dev/zero bs=1M count=XXX >> " into your open Terminal. This way you can just drag and drop the file into Terminal rather than typing out the file location!
Mounting:
If you're switching between builds and need to copy more than just your apps (apps are easily backed up by ASTRO File Manager - found on the Android Market), mount your data.img file and copy/backup the relevant data before moving on!
Linux:
Code:
mount -o loop data.img /mnt/data
Apart from that, I've nothing else to suggest, except maybe moving most of your apps etc from the "internal storage" to the sd card.
Maybe someone with a lot more knowledge than I can help
You could try this program too, not tried it myself, but others report it works
http://forum.xda-developers.com/showthread.php?t=824154

Partitioning microSD card

After setting up my wife's A7 and using it for three weeks, I have decided to open mine up. I waited because I wanted to see if CES had anything I wanted more. I decided they didn't.
So, I am starting from scratch again.
The main issue I've had with my wife's A7 has been the lack of storage space for apps, especially the big games.
Bazbob seems to have a solution by partioning the microSD card and using Apps2sd.
I took a new Class 10 16GB microSD card.
I downloaded and burned Ubuntu onto a CD from here: http://www.ubuntu.com/desktop/get-ubuntu/download
Put the card in my laptop, restarted it into Ubuntu.
Ran gparted.
Shrunk the Fat32 partition to just under 8GB and added another partion as ext2 primary.
When I restarted my laptop, my sd reader in the laptop doesn't work.
When I put it into the A7, it says the SD card has Total Space of 7.73GB.
At this point, I'm not sure what to do next.
Help is appreciated!
jazzbone said:
After setting up my wife's A7 and using it for three weeks, I have decided to open mine up. I waited because I wanted to see if CES had anything I wanted more. I decided they didn't.
So, I am starting from scratch again.
The main issue I've had with my wife's A7 has been the lack of storage space for apps, especially the big games.
Bazbob seems to have a solution by partioning the microSD card and using Apps2sd.
I took a new Class 10 16GB microSD card.
I downloaded and burned Ubuntu onto a CD from here: http://www.ubuntu.com/desktop/get-ubuntu/download
Put the card in my laptop, restarted it into Ubuntu.
Ran gparted.
Shrunk the Fat32 partition to just under 8GB and added another partion as ext2 primary.
When I restarted my laptop, my sd reader in the laptop doesn't work.
When I put it into the A7, it says the SD card has Total Space of 7.73GB.
At this point, I'm not sure what to do next.
Help is appreciated!
Click to expand...
Click to collapse
You needed to make a second partition EXT2 and format it. You then need to mount the partition. I did this by using the install-recovery.sh that it located in /system/etc. I used the following tutorial and it worked. I got over 12gb of space to install apps.
http://forum.xda-developers.com/showthread.php?t=832799
I did try to mount the new partition to /storage which is also /sdcard and i was still not able to use titanium backup to move apps. The only way i have alot of space is use this method.
I'm also mounting the fat32 partition to location /storage so that when i download apps thats where they are stored until you install them. Also Titanium backup dumps the backups here. This is done with a custom mod of Dexters 1.0c mod.
I did not use adb, i used a app called quicksshd which allows you secure ftp into the tablet and make changes. I suggest using a windows programs called winscp and putty.
Thanks for replying rfisher.
Turns out that my laptop lost the drive letter for the sd card. That's fixed now. When I insert the card into my laptop, it says that you need to format the card in the drive to use it. Any idea why?
I am confused by your instructions.
You said
You needed to make a second partition EXT2 and format it.
Click to expand...
Click to collapse
I did that. First partition is FAT 32, and second partition is EXT2, primary.
Maybe I didn't format the partition? I just created it.
I'll install busybox and see how far I can get with it.
With the other A7, I was never able to work with ADB.
This device really makes me feel like an idiot.
Still can't believe I was the first to get Google Apps working on my wife's tablet!
no adb
Well, the hours of frustration have returned...
I can't get adb running on my laptop.
I installed Android SDK.
When I type adb in the cmd window on my laptop, I get
"adb" is not recognized as an internal or external command, operable program or batch file"
I have tried moving the ADK folder to c:\
and
to:
C:\Users\Bucks HP
No luck.
I added the path c:\android-sdk-windows\platform-tools
to the environment variables in my system properties.
My head is going to explode!
Well, I got adb working, I think...
Problem was in the cmd window. I had to change the path.
Now, I can't install busybox. I followed the instructions from the wiki.
When I type "adb push busybox /data/local"
it returns: cannot stat 'busybox' : no such file or directory.
I pasted the busybox file in the
C:\android-sdk-windows\platform-tools
folder.
Was that the right place for it?
Is the busybox file just a text file?
Also, mine is named busybox-armv6l
Should it be renamed? I tried "adb push busybox-armv6l /data/local"
and got the same result...
I gave up on installing busybox via the wiki instructions.
I installed Titanium Backup and installed busybox through it.
Now, when I type: cd /system
mkdir sd
I get :
mkdir failed for sd, read-only file system
What does that mean and how do I fix it?
Thanks
The saga continues...
With the busybox from Titanium Backup installed,
I needed to type:
adb shell
su
mount -o remount,rw /dev/block/mmcblk3p1 /system
exit
exit
Then, following the tutorial, I am up to step 12:
12) Now comes the tricky part: making Android mount your new partition at boot time. All the hard work would be useless if Android discarded the mount points every time we restarted our phones. To do this we’ll need to create 2 scripts and store then into /system/etc. Obviously the scripts should be started by init.rc and need to run as root. Fortunately Android’s init.rc have a gap that makes this possible. The scripts are named install-recovery.sh and init-sd2.sh.
My question is: How do you create scripts?
You would create them with notepad++ which is a windows program. Then using adb push them to the /system/etc directory.
I used a app called quicksshd and a windows program called winscp to copy the files to the directory. If you used my method you first need to make the /system directory rw before it will let you copy the files. It worked for me, the only thing i did differently is edit init.rc to mount the first partition of the sd card to /storage, but this was creating a modded 1.0c rom. So the result is about 4gb for my sd memory and 12gb for installing apps.
jazzbone said:
The saga continues...
With the busybox from Titanium Backup installed,
I needed to type:
adb shell
su
mount -o remount,rw /dev/block/mmcblk3p1 /system
exit
exit
Then, following the tutorial, I am up to step 12:
12) Now comes the tricky part: making Android mount your new partition at boot time. All the hard work would be useless if Android discarded the mount points every time we restarted our phones. To do this we’ll need to create 2 scripts and store then into /system/etc. Obviously the scripts should be started by init.rc and need to run as root. Fortunately Android’s init.rc have a gap that makes this possible. The scripts are named install-recovery.sh and init-sd2.sh.
My question is: How do you create scripts?
Click to expand...
Click to collapse
Hi rfisher
Thanks for replying!
While waiting, I opened Notepad++, copied the text in the tutorial window into it and saved the file as Unix.
Then, I copied it to a USB drive, put it in the A7, and copied to the system/etc folder.
Is that acceptable?
Then, I followed steps 13-15.
I think I did something wrong. I am not seeing it in Root Explorer. What should I be looking for?
Was I supposed to install Apps2SD already?
I got winscp and quicksshd working. YEAH!
Used them to copy the files as you did.
Restarted A7.
Still don't see the other partition.
PS. I was just rereading your earlier post and you mentioned:
I did try to mount the new partition to /storage which is also /sdcard and i was still not able to use titanium backup to move apps. The only way i have alot of space is use this method.
I'm also mounting the fat32 partition to location /storage so that when i download apps thats where they are stored until you install them. Also Titanium backup dumps the backups here. This is done with a custom mod of Dexters 1.0c mod.
Looking on my A7, I don't see a location that is /storage
My tablet is fresh out of the box, without any firmware updates yet.

[Q] Add Legacy GRUB Bootloader on External Device to WBM

Alright...I have a bit of a project going on here. I have a Lenovo S10-3t convertible touch tablet/netbook that I am creating a multiboot scenario for.
To help cover all the details, here are my disks and my partition setup.
640GB HDD as the primary drive
32GB SDCard as the secondary drive.
Primary HDD has these partitions:
MBR PARTITION SCHEME
Partition 1: Windows 8 Pro 64-bit (492.33GB) NTFS, with Win 8 bootloader
Partition 2: Mac OS X Snow Leopard (79.28GB) HFS+ Journaled, with standalone mini-chameleon bootloader
Partition 3: Linux Mint 15 64-bit (23.28GB) EXT4 Journaled, with GRUB2 on this same partition
Partition 4 (in extended partition): Linux Swap (1.27GB) ...swap space
The SDCard has these partitions:
MBR PARTITION SCHEME
Partition 1: Dedicated to ReadyBoost (5GB) FAT32
Partition 2: Android x86 4.2.2 (24.84GB) EXT3, legacy GRUB SHOULD be in the MBR of this disk
I am using the Windows 8 graphical bootloader to manage everything, as it is a touch-screen tablet, and I like having the touch support for the bootloader. So I would PREFER to use it if possible.
I have currently added entries for OSX Snow Leopard and Linux Mint Olivia to the Windows 8 boot manager, and all three OSes chainload properly to their respective bootloaders and are happy with each other.
So...my question is this...is it possible to chainload the Legacy GRUB bootloader in the EXT3 partition on the SD Card that has Android on it with the Windows 8 Bootloader? And, if so, will you walk me through this process?
WHY am I doing this? There's a couple of reasons...as this is a touch screen tablet I would prefer the convenience of having an option to boot Android from the touch-enabled Windows 8 Boot Manager instead of having to fold the screen away from the keyboard, press FN+F11 and selecting the SD Card as the primary boot device every time I want to go into Android. I could have android on a fifth partition on my HDD, but one of the reasons for having Android on flash memory is BECAUSE I have a mechanical HDD, and I use Android if I'm actively moving the laptop around in a rough environment (say, walking or in a moving vehicle for example, and the HDD would be off since it isn't needed). I know I could use an SSD, but I prefer having a mechanical HDD in my laptop for my own reasons.
I am using a combination of VisualBCDEditor and EasyBCD, and I cannot get either to see or acknowledge the existence of the EXT3 partition on the SDCard (though they all see the EXT4 and HFS+ volumes on the primary HDD, and the FAT32 partition on the SDCard...)
feherneoh said:
I'm almost sure that you are using EasyBCD, so just add NeoGRUB to Win8 Bootmenu, and configure it to set root to sdcard's proper partition and do a chainboot.
Click to expand...
Click to collapse
EDIT: Nevermind, I screwed up on the boot arguments and figured out what the problem was (I used windows' notepad to copy the arguments as opposed to Notepad++, which actually respects linux's formatting). I'm able to successfully boot Android chainloading from the Windows 8 graphical bootloader, to NeoGrub, and allowing NeoGrub to boot directly into the kernel. I appreciate the help. I will leave my previous post for future searchers that need help in doing this as well.
-----
Yeah, I mention at the bottom of my post that I'm using a combination of EasyBCD and Visual BCD Editor. I followed your suggestion and added NeoGrub to the list, and opened the menu.lst config file for it.
I copied the majority of the contents of the menu.lst from the "grub" folder in Android x86's partition and pasted it into NeoGrub's menu.lst (editing the harddrive and partition to reflect what it should be, of course).
It sees the kernel and ramdisk images, begins to load them, and then goes into an infinite loop of spawning dots across my screen (I can tell from experience that this means it isn't loading properly and the kernel halted). It seems NeoGrub doesn't support the "special" arguments that need to be passed to the kernel (that passes properly with the legacy GRUB loader), so I guess I need to figure out how to chainload GRUB from NeoGrub now. Back to square one, essentially.
Here is the menu.lst for the existing legacy GRUB on Android's partition:
Code:
default=0
timeout=6
splashimage=/grub/android-x86.xpm.gz
root (hd0,1)
title Android-x86 4.2-test
kernel /android-4.2-test/kernel quiet root=/dev/ram0 androidboot.hardware=android_x86 video=-16 SRC=/android-4.2-test
initrd /android-4.2-test/initrd.img
title Android-x86 4.2-test (Debug mode)
kernel /android-4.2-test/kernel root=/dev/ram0 androidboot.hardware=android_x86 video=-16 DEBUG=1 SRC=/android-4.2-test
initrd /android-4.2-test/initrd.img
I notice in the JellyBean entry you have
Code:
acpi_sleep=s3_bios,s3_mode
I'm curious on what this and the "VGA=778" does. My "VGA" is set to -16 for whatever purpose it fulfills.
I'm assuming the acpi_sleep option allows the kernel to use the S3 sleep state for the hardware, like the same state other OSes use when you shut the lid? Currently all my Android install does is shut the screen off if I close the lid...and I'm fairly certain that's hardware-based anyway.

Categories

Resources