Why mmap is faster than system calls
https://sasha-f.medium.com/why-mmap-is-faster-than-system-calls-24718e75ab37
https://redd.it/ku06nb
@r_linux
https://sasha-f.medium.com/why-mmap-is-faster-than-system-calls-24718e75ab37
https://redd.it/ku06nb
@r_linux
Medium
Why mmap is faster than system calls
When I ask my colleagues why mmap is faster than system calls, the answer is inevitably “system call overhead”: the cost of crossing the…
Has there ever been (or is there currently) a wiki-like or forum-based hardware catalogue where users can share their experiences with various hardware and various distros?
The standard way to go right now is google "my model info, distro, denoscription of problem" and then you get results:
"somewhat similar problem, different distro, older model, unsolved"
"same problem, same distro forum, different model, solved - not applicable"
"exact same problem, windows customer service forum, your exact model, windows: contact your mfgr"
"similar problem, upstream distro, almost your model solution implemented by maintainers, your problem not resolved"
It would be nice for have a wiki where people can catalogue how their installation experience went, what problems they faced, how they overcame it, and maybe a flag "you may contact me for help!"
there could also be issue reports which people could browse and propose solutions, but that might be a bit too similar to posting on a forum - and that's not really the point I don't think.
In an even more perfect world distros could include a link at the end of the installation process "We've had less than qtyReviews installations with your model, if installation required any extra steps please fill out this short questionnaire to help future users"
If something like this exists, I'd like to hear about it, and if not, I'd appreciate your thoughts on how this could work.
https://redd.it/ku22wx
@r_linux
The standard way to go right now is google "my model info, distro, denoscription of problem" and then you get results:
"somewhat similar problem, different distro, older model, unsolved"
"same problem, same distro forum, different model, solved - not applicable"
"exact same problem, windows customer service forum, your exact model, windows: contact your mfgr"
"similar problem, upstream distro, almost your model solution implemented by maintainers, your problem not resolved"
It would be nice for have a wiki where people can catalogue how their installation experience went, what problems they faced, how they overcame it, and maybe a flag "you may contact me for help!"
there could also be issue reports which people could browse and propose solutions, but that might be a bit too similar to posting on a forum - and that's not really the point I don't think.
In an even more perfect world distros could include a link at the end of the installation process "We've had less than qtyReviews installations with your model, if installation required any extra steps please fill out this short questionnaire to help future users"
If something like this exists, I'd like to hear about it, and if not, I'd appreciate your thoughts on how this could work.
https://redd.it/ku22wx
@r_linux
reddit
Has there ever been (or is there currently) a wiki-like or...
The standard way to go right now is google "[my model info], [distro], [denoscription of problem]" and then you get results: "[somewhat similar...
Linux on HDD do i have to enter bios?
I have a Packard bell laptop laying around and i thought why don’t i install linux on it as i don’t need the laptop and could get into learning linux that way without using VM’s or bootable usb.
The problem is i cannot access bios on that laptop as i don’t know the supervisor password. Thats why i cannot install it
So i thought id install Linux on the HDD on an acer laptop and just pop the HDD in the Packard Bell laptop
I wanted to ask if that would work. And the laptop would just boot normally into linux as if it was windows.
Also i guess i can’t dual boot because I’d have to be able to access bios to be able to switch between OS’s.
https://redd.it/ku6b2d
@r_linux
I have a Packard bell laptop laying around and i thought why don’t i install linux on it as i don’t need the laptop and could get into learning linux that way without using VM’s or bootable usb.
The problem is i cannot access bios on that laptop as i don’t know the supervisor password. Thats why i cannot install it
So i thought id install Linux on the HDD on an acer laptop and just pop the HDD in the Packard Bell laptop
I wanted to ask if that would work. And the laptop would just boot normally into linux as if it was windows.
Also i guess i can’t dual boot because I’d have to be able to access bios to be able to switch between OS’s.
https://redd.it/ku6b2d
@r_linux
reddit
Linux on HDD do i have to enter bios?
I have a Packard bell laptop laying around and i thought why don’t i install linux on it as i don’t need the laptop and could get into learning...
Alternatives to Pop!_OS for full-stack development on slower laptops?
I have a mid-range laptop which I use for development. I have ran Pop!\_OS on it for a few years and am very pleased with it. Unfortunately some of my latest projects require a lot of ram, and with 4gb+ Ram just used by the OS I do not have much to work with.
* Lubuntu is much faster but I find the UI almost unusable.
* Kubuntu looks nicer and has themes, but the keyboard shortcuts are terrible and it feels a bit messy.
* Budgie on Ubuntu looks great and its shortcuts are better (not perfect) however it uses a lot of ram, almoust as much as Pop
​
So far Kubuntu is my #1 choice because I can get used to the shortcuts (can't change some because the "windows" button is off limits)
Are there any alternatives which are minimalist, rely on on shortcuts in window manager, and have a low consumption of RAM?
Is there a point in staying with Ubuntu, or should I switch to some other distro?
https://redd.it/ku7ui0
@r_linux
I have a mid-range laptop which I use for development. I have ran Pop!\_OS on it for a few years and am very pleased with it. Unfortunately some of my latest projects require a lot of ram, and with 4gb+ Ram just used by the OS I do not have much to work with.
* Lubuntu is much faster but I find the UI almost unusable.
* Kubuntu looks nicer and has themes, but the keyboard shortcuts are terrible and it feels a bit messy.
* Budgie on Ubuntu looks great and its shortcuts are better (not perfect) however it uses a lot of ram, almoust as much as Pop
​
So far Kubuntu is my #1 choice because I can get used to the shortcuts (can't change some because the "windows" button is off limits)
Are there any alternatives which are minimalist, rely on on shortcuts in window manager, and have a low consumption of RAM?
Is there a point in staying with Ubuntu, or should I switch to some other distro?
https://redd.it/ku7ui0
@r_linux
reddit
Alternatives to Pop!_OS for full-stack development on slower laptops?
I have a mid-range laptop which I use for development. I have ran Pop!\_OS on it for a few years and am very pleased with it. Unfortunately some...
I Finally Tried Arch Linux for the First Time (from Ubuntu), and I am Surprised How Noob-Friendly It Is!
Ever since I was exposed to the Linux community, I was inevitably faced with all the talk and jokes about Arch Linux. It gave me the impression that Arch is an advanced user type of distro, a distro more difficult to use, maybe unnecessarily difficult, for people who enjoy self-torture for the purpose of looking like hacker man! And don't get me wrong, that is slightly appealing, but I discovered this was not really true. Arch is very noob friendly!
Now, I should clarify that Arch is still a minimal install distro. So this means that you will likely not have a very usable OS out of the box right after install. But to me, a noob isn't necessarily someone who doesn't want to learn, it's someone who doesn't know and lacks in knowledge; someone who's new. IF YOU WANT SOMETHING READY TO USE OUT OF THE BOX AFTER INSTALL, ARCH IS NOT FOR YOU. But Arch is certainly for you if you are not exactly a Linux expert. There are a few things that Arch does very well to be noob friendly:
1. The Arch Wiki is VERY GOOD. The Arch wiki does not only have info on how to install and setup arch, it had information on so many things! It has info on how to secure your system, info on so many desktop environments and how to set them up, and even how to start gaming or emulating consoles, and all kinds of popular Linux software. Arch wiki is extremely well written, and will be more than enough for you. Ignore any other source unless it is not in arch wiki.
2. The community support is very good. It might not seem so because of some of the memes and the snobby "Arch btw, you're dumb for using Ubuntu" crowd, but the community is very helpful and willing to support. There is a common misconception that you will have a hard time finding support for anything other than Ubuntu, but most support questions that you find for Ubuntu online will work for arch. This isn't to say that I didn't find enough support that was arch specific (even though it'd probably work outside of arch).
3. Pacman (the package manager) is very easy to use and noob-friendly, and it is very fast.
4. When you build your system from a minimal install, you'll gain a lot of understanding of how it all works, and you'll become better and troubleshooting. Imo, arch is much easier to troubleshoot than Ubuntu. Ubuntu is loaded with things you don't know are there, whereas with arch, you built it from the ground up, you know much more about it.
I will end with saying that this isn't an attempt to bash on other distros or people using them. That is one thing I disliked among some users, and although I will stop using Ubuntu, I still think there is a very good use case for it (some say Mint is better, not here to argue for or against that). But my point is that you should not be afraid from Arch if you've ever had the slightest bit of curiosity. If I had known it was so easy, I would have done it a long time ago.
Tl;Dr
If you've ever wanted to try arch but was daunted by that it might be hard to do and hard to find support, don't worry, there is plenty of support! Just prepare to spend several hours on setting it up :)
https://redd.it/ku84ae
@r_linux
Ever since I was exposed to the Linux community, I was inevitably faced with all the talk and jokes about Arch Linux. It gave me the impression that Arch is an advanced user type of distro, a distro more difficult to use, maybe unnecessarily difficult, for people who enjoy self-torture for the purpose of looking like hacker man! And don't get me wrong, that is slightly appealing, but I discovered this was not really true. Arch is very noob friendly!
Now, I should clarify that Arch is still a minimal install distro. So this means that you will likely not have a very usable OS out of the box right after install. But to me, a noob isn't necessarily someone who doesn't want to learn, it's someone who doesn't know and lacks in knowledge; someone who's new. IF YOU WANT SOMETHING READY TO USE OUT OF THE BOX AFTER INSTALL, ARCH IS NOT FOR YOU. But Arch is certainly for you if you are not exactly a Linux expert. There are a few things that Arch does very well to be noob friendly:
1. The Arch Wiki is VERY GOOD. The Arch wiki does not only have info on how to install and setup arch, it had information on so many things! It has info on how to secure your system, info on so many desktop environments and how to set them up, and even how to start gaming or emulating consoles, and all kinds of popular Linux software. Arch wiki is extremely well written, and will be more than enough for you. Ignore any other source unless it is not in arch wiki.
2. The community support is very good. It might not seem so because of some of the memes and the snobby "Arch btw, you're dumb for using Ubuntu" crowd, but the community is very helpful and willing to support. There is a common misconception that you will have a hard time finding support for anything other than Ubuntu, but most support questions that you find for Ubuntu online will work for arch. This isn't to say that I didn't find enough support that was arch specific (even though it'd probably work outside of arch).
3. Pacman (the package manager) is very easy to use and noob-friendly, and it is very fast.
4. When you build your system from a minimal install, you'll gain a lot of understanding of how it all works, and you'll become better and troubleshooting. Imo, arch is much easier to troubleshoot than Ubuntu. Ubuntu is loaded with things you don't know are there, whereas with arch, you built it from the ground up, you know much more about it.
I will end with saying that this isn't an attempt to bash on other distros or people using them. That is one thing I disliked among some users, and although I will stop using Ubuntu, I still think there is a very good use case for it (some say Mint is better, not here to argue for or against that). But my point is that you should not be afraid from Arch if you've ever had the slightest bit of curiosity. If I had known it was so easy, I would have done it a long time ago.
Tl;Dr
If you've ever wanted to try arch but was daunted by that it might be hard to do and hard to find support, don't worry, there is plenty of support! Just prepare to spend several hours on setting it up :)
https://redd.it/ku84ae
@r_linux
reddit
I Finally Tried Arch Linux for the First Time (from Ubuntu), and I...
Ever since I was exposed to the Linux community, I was inevitably faced with all the talk and jokes about Arch Linux. It gave me the impression...
Pop!OS with i3 window manager
Pop!OS requires a lot of ram to run, and on a standard 8gig laptop its becomes an issue when running large apps (on node js for example)
Is it possible to install a window manager or a lightweight desktop environment to give the ability to switch to a less ram demanding mode by logging out ?
Are there distros with a sort of boost option which would "turn off" the UI for memory demanding tasks?
https://redd.it/ku8bso
@r_linux
Pop!OS requires a lot of ram to run, and on a standard 8gig laptop its becomes an issue when running large apps (on node js for example)
Is it possible to install a window manager or a lightweight desktop environment to give the ability to switch to a less ram demanding mode by logging out ?
Are there distros with a sort of boost option which would "turn off" the UI for memory demanding tasks?
https://redd.it/ku8bso
@r_linux
reddit
Pop!_OS with i3 window manager
Pop!_OS requires a lot of ram to run, and on a standard 8gig laptop its becomes an issue when running large apps (on node js for example) Is it...
how to map a multiple commands in
I want something like this
https://redd.it/ku9yox
@r_linux
Zathura Pdf viewer.I want something like this
map 1 feedkeys ":set recolor-lightcolor \\#779eaf<Return>":"set default-bg '#779eaf' <Return>" , it's working for when i resource zathurarc or restarting x server after i open my first pdf it works fine , but after that if i open any pdf and click 1 it says :et command not found something ,why it works and not works the seond time i dont understand.https://redd.it/ku9yox
@r_linux
reddit
how to map a multiple commands in `Zathura` Pdf viewer.
I want something like this `map 1 feedkeys ":set recolor-lightcolor \\#779eaf<Return>":"set default-bg '#779eaf' <Return>"` , it's working for...
MacOs and Win VM's: Are them any good?
Is there a way I could run thoose 2 OS from Linux, and get same performance, as them were run from a real mac or win pc?
I love linux, but I dont have many apps that are only avaiable on Macos or Win, for my professional work environment.
But I am done, forced from Apple to buy the new hardware every year!! Thats sucks!
First, I was thinking of building a h4ck1nt0sh, and then I bought a Intel Nuc8i5bek. Then I came up on a youtube video: the guy was running macos, inside of linux. I couldn't believe it!
How would you compare a h4ck1nt0sh vs a VM inside linux?
Which would be the compromise and Which are the flaws?
How would you compare, the level of security, VM vs h4ck1nt0sh?
https://redd.it/kubaez
@r_linux
Is there a way I could run thoose 2 OS from Linux, and get same performance, as them were run from a real mac or win pc?
I love linux, but I dont have many apps that are only avaiable on Macos or Win, for my professional work environment.
But I am done, forced from Apple to buy the new hardware every year!! Thats sucks!
First, I was thinking of building a h4ck1nt0sh, and then I bought a Intel Nuc8i5bek. Then I came up on a youtube video: the guy was running macos, inside of linux. I couldn't believe it!
How would you compare a h4ck1nt0sh vs a VM inside linux?
Which would be the compromise and Which are the flaws?
How would you compare, the level of security, VM vs h4ck1nt0sh?
https://redd.it/kubaez
@r_linux
reddit
MacOs and Win VM's: Are them any good?
Is there a way I could run thoose 2 OS from Linux, and get same performance, as them were run from a real mac or win pc? I love linux, but I dont...
USB mic makes constant click
When I use any usb microphone, everyone on the conference call hears a constant clicking, about 2 a second. It doesn’t matter if I’m speaking or not, although my voice seems to drown out the clicking.
Ubuntu 20.04 now, but I’m 99% sure 18.04 did it also. I tried a couple different usb mics.
Analog microphone works fine, so that’s what I’m using now.
https://redd.it/ku9d70
@r_linux
When I use any usb microphone, everyone on the conference call hears a constant clicking, about 2 a second. It doesn’t matter if I’m speaking or not, although my voice seems to drown out the clicking.
Ubuntu 20.04 now, but I’m 99% sure 18.04 did it also. I tried a couple different usb mics.
Analog microphone works fine, so that’s what I’m using now.
https://redd.it/ku9d70
@r_linux
reddit
USB mic makes constant click
When I use any usb microphone, everyone on the conference call hears a constant clicking, about 2 a second. It doesn’t matter if I’m speaking or...
Any laptop brands to stay away from as a Linux user?
I am in the search for a new laptop and when googling I find a few recommendations on which brands to purchase a computer from as a Linux user.
Now I wonder, is there any list out there of brands to stay away from? Brands where the computers often do not work well with Linux?
https://redd.it/kuc5mu
@r_linux
I am in the search for a new laptop and when googling I find a few recommendations on which brands to purchase a computer from as a Linux user.
Now I wonder, is there any list out there of brands to stay away from? Brands where the computers often do not work well with Linux?
https://redd.it/kuc5mu
@r_linux
reddit
Any laptop brands to stay away from as a Linux user?
I am in the search for a new laptop and when googling I find a few recommendations on which brands to purchase a computer from as a Linux user. ...
New pacman parallel download. installing five apps in 10 seconds
https://asciinema.org/a/Dkr5ocECp6dV294KVD8CopvzC
https://redd.it/kuf9z0
@r_linux
https://asciinema.org/a/Dkr5ocECp6dV294KVD8CopvzC
https://redd.it/kuf9z0
@r_linux
Hoe to add bitlocker encryption like thunar from xfce to kubuntu?
Hi guys so xubuntu or manjaro xfce comes with thunar file manager and it has inbuilt support for bitlocker. I tried installing thunar on kubuntu but bitlocker support is not there. What packages I am missing? And no I dont want to do manual mount and decryption using dislocker.
https://redd.it/kug00y
@r_linux
Hi guys so xubuntu or manjaro xfce comes with thunar file manager and it has inbuilt support for bitlocker. I tried installing thunar on kubuntu but bitlocker support is not there. What packages I am missing? And no I dont want to do manual mount and decryption using dislocker.
https://redd.it/kug00y
@r_linux
reddit
Hoe to add bitlocker encryption like thunar from xfce to kubuntu?
Hi guys so xubuntu or manjaro xfce comes with thunar file manager and it has inbuilt support for bitlocker. I tried installing thunar on kubuntu...
What DE or distro is eaisiest to customise for elderly people and what customisations would you recommend?
By DE i mean desktop environment, i would like to know just incase i see any elderly people who struggle to use their windows system and would like spmething simpler, preferbly lightweight as thier computers are either from the windows xp days or £200 celeron laptops
https://redd.it/kum43x
@r_linux
By DE i mean desktop environment, i would like to know just incase i see any elderly people who struggle to use their windows system and would like spmething simpler, preferbly lightweight as thier computers are either from the windows xp days or £200 celeron laptops
https://redd.it/kum43x
@r_linux
reddit
What DE or distro is eaisiest to customise for elderly people and...
By DE i mean desktop environment, i would like to know just incase i see any elderly people who struggle to use their windows system and would...
How Prosody developers spent 2020
https://blog.prosody.im/2020-retrospective/
https://redd.it/kum1lh
@r_linux
https://blog.prosody.im/2020-retrospective/
https://redd.it/kum1lh
@r_linux
blog.prosody.im
How Prosody developers spent 2020
Nobody here knew quite what a year 2020 was going to be! However despite pandemics and lockdowns, we have continued to work on Prosody. This post is a summary of how the project is doing, and what we’ve been up to in the past year.
One quick note before we…
One quick note before we…
Firefox – we’re finally getting HW acceleration on Linux
https://mastransky.wordpress.com/2021/01/10/firefox-were-finally-getting-hw-acceleration-on-linux/
https://redd.it/kup0ca
@r_linux
https://mastransky.wordpress.com/2021/01/10/firefox-were-finally-getting-hw-acceleration-on-linux/
https://redd.it/kup0ca
@r_linux
Martin Stransky's Blog
Firefox – we’re finally getting HW acceleration on Linux
A first image from original WebRender article. Published three years ago. Firefox 84.0 is a big milestone for Firefox Linux development as it comes with HW acceleration by default for some Linux us…
WSL 2 or a virtual machine ?
I finally upgraded my laptop, but it has a new AMD processor and Nvidia graphics card. So I will be keeping Windows 10 for now. However, I would like to continue running a bitcoin node and lightning node. I have only ever installed these via linux systems. Would it be possible in WSL 2 to do this?
Thanks for any insights.
https://redd.it/kusmm7
@r_linux
I finally upgraded my laptop, but it has a new AMD processor and Nvidia graphics card. So I will be keeping Windows 10 for now. However, I would like to continue running a bitcoin node and lightning node. I have only ever installed these via linux systems. Would it be possible in WSL 2 to do this?
Thanks for any insights.
https://redd.it/kusmm7
@r_linux
reddit
WSL 2 or a virtual machine ?
I finally upgraded my laptop, but it has a new AMD processor and Nvidia graphics card. So I will be keeping Windows 10 for now. However, I would...
SUCCESS: iPhone 7 with dead NAND netbooting unmodified Ubuntu 20.04 arm64 over usb gadget ethernet
I just got done with this incredible experiment, and I couldn't resist sharing.
EDIT: VIDEO!!! **https://youtu.be/DrntxWqDuvI**
\--------
Prerequisites
1. writable directory available over nfs, including dhcp server on local network
2. checkra1n 0.10.2-beta (get at https://checkra.in/releases/0.10.2-beta#all-downloads)
3. Kernel fork for h9x/A10 (https://github.com/corellium/linux-sandcastle)
4. projectsandcastle utilities (https://github.com/corellium/projectsandcastle)
5. EITHER arm64 cross compiler or an arm64 native device. I used a rpi4 on 20.04 <-- way helpful to be able to chroot and setup, otherwise you'd have to use qemu-user
6. Bridge setup noscript/udev rules by me https://github.com/newperson1746/iphone7-linux-nfsroot
1. Rootfs setup
Make sure you have debootstrap. I'm assuming an arm64 native ubuntu device already running to which you have mounted the nfs directory at
`sudo debootstrap focal /mnt/nfsrootarm64`
Now you can
I'd install nano for convenience, I'll assume you have it from now on
`dpkg-reconfigure locales`
This'll fix the famous debootstrap LC_ALL error. I chose en_US.utf-8 and also chose it as default.
`dpkg-reconfigure tzdata`
Here you can fix the clock
`adduser <someuser>`
This'll be your non-root admin user for regular use
`adduser <someuser> sudo`
Add focal-updates, focal-backports, and focal-security!
You can also add universe if you want to at this point
2. Kernel setup
clone the sandcastle kernel, and
CONFIG\_USB\_ETH=y
CONFIG_NFS_FS=y
CONFIG\_IP\_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG\_BLK\_DEV\_INITRD=n // (none needed, otherwise it'll complain about wanting one)
CONFIG_CMDLINE="earlycon=hx_uart,0x20a0c0000 console=tty0 root=/dev/nfs rw nfsroot=<your_nfs_server_ip>:/nfsrootarm64,vers=4,tcp init=/usr/bin/systemd rootwait ip=dhcp g_ether.host_addr=12:a5:cf:42:92:fd g_ether.dev_addr=5e:bc:ca:27:92:b1 g_ether.idVendor=1317 g_ether.idProduct=42146 mitigations=off"
Replace the MAC addresses if you'd like, but I'll assume these are the ones moving forward
Fill in your nfs server ip
All of the flags are needed, I spent like 30 power cycles figuring out why nfs wouldn't mount unless i specified tcp.
CONFIG_ROOT_NFS=y
CONFIG\_CMDLINE\_FORCE=y
CONFIG_DEBUG_INFO=n // to speed up compile drastically
Now you can export
Now run `./dtbpack.sh` to generate the device-trees that PongoOS will use later.
3. Project Sandcastle utilities: clone the repo and cd to loader.
`make` will fail so simply run manually `cc -O2 -Wall load-linux.c -lusb-1.0 -o load-linux`
4. Networking setup: clone my repo.
edit [`ethbridge.sh`](https://ethbridge.sh) with your ethernet ifname (it can trivially be modified to accept it as an argument from udev or something like that, but I'm lazy)
Place it somewhere static so you can call it from udev later
edit `70-iphone7.rules` with the MAC of your `g_ether` if you changed it, and put the correct path to [`ethbridge.sh`](https://ethbridge.sh)
I just got done with this incredible experiment, and I couldn't resist sharing.
EDIT: VIDEO!!! **https://youtu.be/DrntxWqDuvI**
\--------
Prerequisites
1. writable directory available over nfs, including dhcp server on local network
2. checkra1n 0.10.2-beta (get at https://checkra.in/releases/0.10.2-beta#all-downloads)
3. Kernel fork for h9x/A10 (https://github.com/corellium/linux-sandcastle)
4. projectsandcastle utilities (https://github.com/corellium/projectsandcastle)
5. EITHER arm64 cross compiler or an arm64 native device. I used a rpi4 on 20.04 <-- way helpful to be able to chroot and setup, otherwise you'd have to use qemu-user
6. Bridge setup noscript/udev rules by me https://github.com/newperson1746/iphone7-linux-nfsroot
1. Rootfs setup
Make sure you have debootstrap. I'm assuming an arm64 native ubuntu device already running to which you have mounted the nfs directory at
/mnt/nfsrootarm64`sudo debootstrap focal /mnt/nfsrootarm64`
Now you can
chroot into it and run some important pre-setup:I'd install nano for convenience, I'll assume you have it from now on
apt install nano network-manager openssh-server`dpkg-reconfigure locales`
This'll fix the famous debootstrap LC_ALL error. I chose en_US.utf-8 and also chose it as default.
`dpkg-reconfigure tzdata`
Here you can fix the clock
`adduser <someuser>`
This'll be your non-root admin user for regular use
`adduser <someuser> sudo`
nano /etc/apt/sources.listAdd focal-updates, focal-backports, and focal-security!
You can also add universe if you want to at this point
2. Kernel setup
clone the sandcastle kernel, and
make hx_h9p_defconfig , now we need to make quite a few changes to the config. I did them manually by editing .config:CONFIG\_USB\_ETH=y
CONFIG_NFS_FS=y
CONFIG\_IP\_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG\_BLK\_DEV\_INITRD=n // (none needed, otherwise it'll complain about wanting one)
CONFIG_CMDLINE="earlycon=hx_uart,0x20a0c0000 console=tty0 root=/dev/nfs rw nfsroot=<your_nfs_server_ip>:/nfsrootarm64,vers=4,tcp init=/usr/bin/systemd rootwait ip=dhcp g_ether.host_addr=12:a5:cf:42:92:fd g_ether.dev_addr=5e:bc:ca:27:92:b1 g_ether.idVendor=1317 g_ether.idProduct=42146 mitigations=off"
Replace the MAC addresses if you'd like, but I'll assume these are the ones moving forward
Fill in your nfs server ip
All of the flags are needed, I spent like 30 power cycles figuring out why nfs wouldn't mount unless i specified tcp.
CONFIG_ROOT_NFS=y
CONFIG\_CMDLINE\_FORCE=y
CONFIG_DEBUG_INFO=n // to speed up compile drastically
Now you can export
LOCALVERSION if you'd like, and CROSS_COMPILE and ARCH=arm64if needed, but now it's just the good old:make -j 4 ImageNow run `./dtbpack.sh` to generate the device-trees that PongoOS will use later.
lzma -z --stdout arch/arm64/boot/Image > ../Image.lzma to create the linux image that PongoOS can boot3. Project Sandcastle utilities: clone the repo and cd to loader.
`make` will fail so simply run manually `cc -O2 -Wall load-linux.c -lusb-1.0 -o load-linux`
(-lusb was before load-linux.c, which broke sometime after sandcastle was first released)4. Networking setup: clone my repo.
edit [`ethbridge.sh`](https://ethbridge.sh) with your ethernet ifname (it can trivially be modified to accept it as an argument from udev or something like that, but I'm lazy)
Place it somewhere static so you can call it from udev later
edit `70-iphone7.rules` with the MAC of your `g_ether` if you changed it, and put the correct path to [`ethbridge.sh`](https://ethbridge.sh)
YouTube
iPhone 7 booting Ubuntu 20.04 (to tty/command line)
EDIT: GOT IT TO BOOT GUI! https://www.youtube.com/watch?v=DO8vt34kTh0
https://www.reddit.com/r/linux/comments/kvmsfd/success_iphone_7_booting_ubuntu_2004_to_full/
---------
ORIGINAL THREAD:
https://www.reddit.com/r/linux/comments/kux9xx/success_iphone_…
https://www.reddit.com/r/linux/comments/kvmsfd/success_iphone_7_booting_ubuntu_2004_to_full/
---------
ORIGINAL THREAD:
https://www.reddit.com/r/linux/comments/kux9xx/success_iphone_…
SUCCESS: iPhone 7 with dead NAND netbooting unmodified Ubuntu 20.04 arm64 over usb gadget ethernet
I just got done with this incredible experiment, and I couldn't resist sharing.
**EDIT: VIDEO!!!** [**https://youtu.be/DrntxWqDuvI**](https://youtu.be/DrntxWqDuvI)
\--------
**Prerequisites**
1. writable directory available over nfs, including dhcp server on local network
2. checkra1n 0.10.2-beta (get at [https://checkra.in/releases/0.10.2-beta#all-downloads](https://checkra.in/releases/0.10.2-beta#all-downloads))
3. Kernel fork for h9x/A10 ([https://github.com/corellium/linux-sandcastle](https://github.com/corellium/linux-sandcastle))
4. projectsandcastle utilities ([https://github.com/corellium/projectsandcastle](https://github.com/corellium/projectsandcastle.git))
5. EITHER arm64 cross compiler or an arm64 native device. I used a rpi4 on 20.04 <-- way helpful to be able to chroot and setup, otherwise you'd have to use qemu-user
6. Bridge setup noscript/udev rules by me [https://github.com/newperson1746/iphone7-linux-nfsroot](https://github.com/newperson1746/iphone7-linux-nfsroot)
**1. Rootfs setup**
Make sure you have debootstrap. I'm assuming an arm64 native ubuntu device already running to which you have mounted the nfs directory at `/mnt/nfsrootarm64`
* `sudo debootstrap focal /mnt/nfsrootarm64`
* Now you can `chroot` into it and run some important pre-setup:
* I'd install nano for convenience, I'll assume you have it from now on
* `apt install nano network-manager openssh-server`
* `dpkg-reconfigure locales`
* This'll fix the famous debootstrap LC\_ALL error. I chose en\_US.utf-8 and also chose it as default.
* `dpkg-reconfigure tzdata`
* Here you can fix the clock
* `adduser <someuser>`
* This'll be your non-root admin user for regular use
* `adduser <someuser> sudo`
* `nano /etc/apt/sources.list`
* Add focal-updates, focal-backports, and focal-security!
* You can also add universe if you want to at this point
**2. Kernel setup**
clone the sandcastle kernel, and `make hx_h9p_defconfig` , now we need to make quite a few changes to the config. I did them manually by editing .config:
* CONFIG\_USB\_ETH=y
* CONFIG\_NFS\_FS=y
* CONFIG\_IP\_PNP=y
* CONFIG\_IP\_PNP\_DHCP=y
* CONFIG\_BLK\_DEV\_INITRD=n // (none needed, otherwise it'll complain about wanting one)
* CONFIG\_CMDLINE="earlycon=hx\_uart,0x20a0c0000 console=tty0 root=/dev/nfs rw nfsroot=[<](https://172.16.13.1)your\_nfs\_server\_ip>:/nfsrootarm64,vers=4,tcp init=/usr/bin/systemd rootwait ip=dhcp g\_ether.host\_addr=12:a5:cf:42:92:fd g\_ether.dev\_addr=5e:bc:ca:27:92:b1 g\_ether.idVendor=1317 g\_ether.idProduct=42146 mitigations=off"
* Replace the MAC addresses if you'd like, but I'll assume these are the ones moving forward
* Fill in your nfs server ip
* All of the flags are needed, I spent like 30 power cycles figuring out why nfs wouldn't mount unless i specified tcp.
* CONFIG\_ROOT\_NFS=y
* CONFIG\_CMDLINE\_FORCE=y
* CONFIG\_DEBUG\_INFO=n // to speed up compile drastically
Now you can export `LOCALVERSION` if you'd like, and `CROSS_COMPILE` and `ARCH=arm64`if needed, but now it's just the good old:
`make -j 4 Image`
* Now run `./dtbpack.sh` to generate the device-trees that PongoOS will use later.
* `lzma -z --stdout arch/arm64/boot/Image > ../Image.lzma` to create the linux image that PongoOS can boot
**3. Project Sandcastle utilities: clone the repo and cd to loader.**
* `make` will fail so simply run manually `cc -O2 -Wall load-linux.c -lusb-1.0 -o load-linux`
* `(-lusb` was before `load-linux.c,` which broke sometime after sandcastle was first released)
**4. Networking setup: clone my repo.**
* edit [`ethbridge.sh`](https://ethbridge.sh) with your ethernet ifname (it can trivially be modified to accept it as an argument from udev or something like that, but I'm lazy)
* Place it somewhere static so you can call it from udev later
* edit `70-iphone7.rules` with the MAC of your `g_ether` if you changed it, and put the correct path to [`ethbridge.sh`](https://ethbridge.sh)
*
I just got done with this incredible experiment, and I couldn't resist sharing.
**EDIT: VIDEO!!!** [**https://youtu.be/DrntxWqDuvI**](https://youtu.be/DrntxWqDuvI)
\--------
**Prerequisites**
1. writable directory available over nfs, including dhcp server on local network
2. checkra1n 0.10.2-beta (get at [https://checkra.in/releases/0.10.2-beta#all-downloads](https://checkra.in/releases/0.10.2-beta#all-downloads))
3. Kernel fork for h9x/A10 ([https://github.com/corellium/linux-sandcastle](https://github.com/corellium/linux-sandcastle))
4. projectsandcastle utilities ([https://github.com/corellium/projectsandcastle](https://github.com/corellium/projectsandcastle.git))
5. EITHER arm64 cross compiler or an arm64 native device. I used a rpi4 on 20.04 <-- way helpful to be able to chroot and setup, otherwise you'd have to use qemu-user
6. Bridge setup noscript/udev rules by me [https://github.com/newperson1746/iphone7-linux-nfsroot](https://github.com/newperson1746/iphone7-linux-nfsroot)
**1. Rootfs setup**
Make sure you have debootstrap. I'm assuming an arm64 native ubuntu device already running to which you have mounted the nfs directory at `/mnt/nfsrootarm64`
* `sudo debootstrap focal /mnt/nfsrootarm64`
* Now you can `chroot` into it and run some important pre-setup:
* I'd install nano for convenience, I'll assume you have it from now on
* `apt install nano network-manager openssh-server`
* `dpkg-reconfigure locales`
* This'll fix the famous debootstrap LC\_ALL error. I chose en\_US.utf-8 and also chose it as default.
* `dpkg-reconfigure tzdata`
* Here you can fix the clock
* `adduser <someuser>`
* This'll be your non-root admin user for regular use
* `adduser <someuser> sudo`
* `nano /etc/apt/sources.list`
* Add focal-updates, focal-backports, and focal-security!
* You can also add universe if you want to at this point
**2. Kernel setup**
clone the sandcastle kernel, and `make hx_h9p_defconfig` , now we need to make quite a few changes to the config. I did them manually by editing .config:
* CONFIG\_USB\_ETH=y
* CONFIG\_NFS\_FS=y
* CONFIG\_IP\_PNP=y
* CONFIG\_IP\_PNP\_DHCP=y
* CONFIG\_BLK\_DEV\_INITRD=n // (none needed, otherwise it'll complain about wanting one)
* CONFIG\_CMDLINE="earlycon=hx\_uart,0x20a0c0000 console=tty0 root=/dev/nfs rw nfsroot=[<](https://172.16.13.1)your\_nfs\_server\_ip>:/nfsrootarm64,vers=4,tcp init=/usr/bin/systemd rootwait ip=dhcp g\_ether.host\_addr=12:a5:cf:42:92:fd g\_ether.dev\_addr=5e:bc:ca:27:92:b1 g\_ether.idVendor=1317 g\_ether.idProduct=42146 mitigations=off"
* Replace the MAC addresses if you'd like, but I'll assume these are the ones moving forward
* Fill in your nfs server ip
* All of the flags are needed, I spent like 30 power cycles figuring out why nfs wouldn't mount unless i specified tcp.
* CONFIG\_ROOT\_NFS=y
* CONFIG\_CMDLINE\_FORCE=y
* CONFIG\_DEBUG\_INFO=n // to speed up compile drastically
Now you can export `LOCALVERSION` if you'd like, and `CROSS_COMPILE` and `ARCH=arm64`if needed, but now it's just the good old:
`make -j 4 Image`
* Now run `./dtbpack.sh` to generate the device-trees that PongoOS will use later.
* `lzma -z --stdout arch/arm64/boot/Image > ../Image.lzma` to create the linux image that PongoOS can boot
**3. Project Sandcastle utilities: clone the repo and cd to loader.**
* `make` will fail so simply run manually `cc -O2 -Wall load-linux.c -lusb-1.0 -o load-linux`
* `(-lusb` was before `load-linux.c,` which broke sometime after sandcastle was first released)
**4. Networking setup: clone my repo.**
* edit [`ethbridge.sh`](https://ethbridge.sh) with your ethernet ifname (it can trivially be modified to accept it as an argument from udev or something like that, but I'm lazy)
* Place it somewhere static so you can call it from udev later
* edit `70-iphone7.rules` with the MAC of your `g_ether` if you changed it, and put the correct path to [`ethbridge.sh`](https://ethbridge.sh)
*
YouTube
iPhone 7 booting Ubuntu 20.04 - YouTube