foxlet / bootra1n

Just enough Linux for checkra1n.
663 stars 134 forks source link

[Solved] How to install and run Bootra1n from a hard drive partition? #98

Open Spedemix opened 3 years ago

Spedemix commented 3 years ago

I have solved my issue by installing a vanilla voidlinux, buying a TB-Ethernet adapter and installing usbmuxd and libirecovery.

First I updated my voidlinux by running xbps-install -Su

Then I installed the tools needed to recognize my iPhone xbps-install -S usbmuxd xbps-install -S libirecovery

Orig msg: I have a Macbook Air 2013 (OSX 10.9.5) in which the MacOS version of Checkra1n does not work. I've been using Bootra1n on a USB stick to JB my phone. I'd like to install Bootra1n permanently on single partition on the laptop's hard drive so I don't have to dig up an UBS stick everytime I have to re-JB.

Turns out getting Bootra1n on a hard drive partition is way more complicated than I expected. So far I've tried the following things:

All pendrive makers (Rufus, Unetbootin, BalenaEtcher etc.) only allow you to create an installation onto an USB stick, none of them allow you to choose a hard drive.

The built-in Disk Manager for OSX has pretty much never worked for me when I attempt to restore a disk from an image. I gave up on it years ago.

I've tried using the dd command in OSX terminal. If I dd the image onto a whole USB disk Bootra1n works correctly. However if I attempt to dd onto a single partition it won't boot (no linux found, please insert bootable drive etc.)

Unetbootin allows me to install Bootra1n on a single partition in an USB stick and on top of that it's readable in OSX. I've tried manually copying the contents of the USB partition to the hard drive partition but it won't boot (insert bootable drive etc.). I think the problem here is MBR vs GPT. My hard drive is naturally GPT (and the partition I'm trying to use Bootra1n for is disk0s4) but I think Unetbootin creates MBR schemes. So naturally it would be unbootable. I don't know which files to switch around to get it boot in a GPT disk.

So it'd be nice if someone could tell me exactly how can I put the contents of the Bootra1n ISO onto a hard drive partition and have it behave exactly like the USB would: It'd first boot into GRUB from which you'd then choose the version of Bootra1n to run.

I've also unpacked the contents of the bootrain ISO. Inside it I have 3 folders: [BOOT], boot and LiveOS. Inside of each is at least one image file. I haven't tried using dd on the squashhfs.img (the image inside the LiveOS folder) and output it to the hard drive partition. I'll test it on the USB stick but that'd mean I lose the GRUB I believe.

A more difficult option would be people to tell me exactly the contents of the voidlinux package used for Bootra1n so I could attempt to install it myself onto the partition along with the Unix version of Bootra1n and configure it the same way as the Bootra1n Live CD is configured.

I'm using rEFInd bootloader on this Macbook which is bit more flexible than the native Apple EFI (or whatever you wanna call it).

Googling hasn't really gotten me anywhere so I really appreciate any help here.

Spedemix commented 3 years ago

Addition:

I've extracted the contents of the ISO and copied both boot and LiveOS folders on the partition. I also tried locating the boot folder into the EFI folder in ESP. In both cases rEFInd tries to load voidlinux but it stops on the following error:

Run /init as init process dracut: FATAL: No or empty root= argument dracut: Refusing to continue dracut Warning: Signal caught!

Spedemix commented 3 years ago

I've also tried "void-installer" -command once I've booted Bootra1n which according to the instructions allow one to install the system locally. It throws me an error: missing dialog command, exiting...

Spedemix commented 3 years ago

...and now I've gotten to the point where I've installed base void linux, gotten it booting correctly, downloaded checkra1n linux version and put it in the bin folder of void linux.

checkra1n boots but won't recognize my phone.

demhademha commented 3 years ago

You need to install the libimobiledevice utils, such as usbmuxd and libirecovery Hope that helps

Spedemix commented 3 years ago

^^Thanks. I'll give it a try tomorrow.

demhademha commented 3 years ago

Ok, tell me how that goes

Spedemix commented 3 years ago

I've been working with this vanilla void linux for awhile now these past 2 days. Basically i've gotten to a point where I'm trying to get the wlan working, installing a Broadcom driver so i can get to the part of actually installing these packages required to get the Iphone recognized and so on. Initially I couldn't even get `xbps-install´ to work for local files until I solved some repo shenanigans.

I just installed the most recent firmware for my wlan card (and on reboot it even says driver found) but when I type ip link show my wlan01 is still not showing up. That's the point I've gotten so far.

Basically I need to get the wireless working before I even begin figuring out how to get the iPhone packages. Foxlet's own guide requires an internet connection.

Easiest solution would be if someone were to provide usbmuxd.xbps and ilibmobiledeviceutils.xbps (along with all of their dependencies) as downloads and I'd basically be done with this pretty much immediately.

demhademha commented 3 years ago

Just cross-compile them

Spedemix commented 3 years ago

I have solved my issue by installing a vanilla voidlinux, buying a TB-Ethernet adapter and installing usbmuxd and libirecovery.

First I updated my voidlinux by running xbps-install -Su

Then I installed the tools needed to recognize my iPhone xbps-install -S usbmuxd xbps-install -S libirecovery