Debian LiveCD: Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
Line 13: Line 13:


# Grab a beer and reverse some PS3 stuff in the meantime :)
# Grab a beer and reverse some PS3 stuff in the meantime :)
# Enter chroot environment


mount -t proc none /root/livecd/proc
mount -t proc none /root/livecd/proc
mount --rbind /dev /root/livecd/dev
mount --rbind /dev /root/livecd/dev
LANG=C chroot /root/livecd /bin/bash
LANG=C chroot /root/livecd /bin/bash
export TERM=xterm-color
echo "debian" > /etc/hostname
dpkg-reconfigure tzdata
# Configure network interfaces
cat /etc/network/interfaces
---
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet dhcp
    wpa-ssid ssid
    wpa-psk psk
-EOF-


</pre>
</pre>

Revision as of 13:40, 18 August 2012

Introduction

  • Sometimes we need to boot Linux without HDD e.g. if you want to experiment with HDD encryption, enable/disable it without causing damage to your data. For such cases we need a LiveCD which doesn't mount HDD at boot.

Creating Initial System with debootstrap

apt-get install debootstrap

mkdir livecd

debootstrap --arch powerpc squeeze /root/livecd http://ftp.us.debian.org/debian

# Grab a beer and reverse some PS3 stuff in the meantime :)

# Enter chroot environment

mount -t proc none /root/livecd/proc
mount --rbind /dev /root/livecd/dev
LANG=C chroot /root/livecd /bin/bash

export TERM=xterm-color

echo "debian" > /etc/hostname

dpkg-reconfigure tzdata

# Configure network interfaces

cat /etc/network/interfaces
---
auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet dhcp
    wpa-ssid ssid
    wpa-psk psk
-EOF-

Initramfs

Linux 3 Kernel

  • We need a Linux 3 kernel with overlayfs support so we could create a tmpfs over our read-only base filesystem.
  • At the moment overlayfs is not supported on Linux 3.5 so it leaves us with Linux 3.4 which doesn't really matter because all my Linux 3 drivers are supported on Linux 3.4 just fine.
  • Furthermore, we want to compile PS3 HDD driver as module because in this case we can easily change HDD region flags.

Links