How To Install Debian Squeeze on LG Optimus V

Search This thread

meta1203

New member
Jul 31, 2011
4
2
Hello! This is my first walkthrough for one of my first accomplishments on my first android phone, the LG Optimus V. This guide will show you how to put debian squeeze into a chroot environment on your Optimus V. Lets get started!

Just a side note before we start:
I am not responsible for any mistake you made/in the hardware/software, so any problems with your phone is your own fault. I recommend backing up before a ROM install.

1) Root your phone.
I will not cover this, but there are many guides to root an Optimus V on Google. Just search it! :)

2) Install Custom Recovery Image (optional if your ROM has ext2 support)
Android 2.2 Froyo currently DOES NOT have ext2 support in the kernel, so we need to install an Android build that does. I used aospCMod, which works flawlessly. Download from dl.dropbox.com/u/14791765/preinstall.zip and unzip it. Move the "preinstall" folder over to your SD card on your Optimus. Now run these commands as root (I recommend using "adb shell" and then running "su" as the shell)
Code:
# The following installs "flash_image" to /system/bin, then makes it executable
cd /mnt/sdcard/preinstall
mount -o remount,rw -t yaffs2 /dev/block/mtdblock5 /system
cat flash_image > /system/bin/flash_image
chmod 755 /system/bin/flash_image
# The following flashes recovery-thunderc-v-1.2.0-GNM.img to recovery
flash_image recovery /mnt/sdcard/preinstall/recovery-thunderc-v-1.2.0-GNM.img
reboot recovery
Your phone should reboot into your newly flashed recovery partition

2.5) Install aospCMod (optional if your ROM has ext2 support)
Now, using the volume rocker, the menu button, and the back button, back up your phone, go to "Backup/Restore" -> "Backup Google proprietary system files" and press menu. This will back up your working system.

Now back at the main menu, navigate to "Flash zip menu" -> "Flash zip from Sdcard" -> "preinstall" -> "aospCMod-VM670-20110601-signed.zip". Install the ROM. Now do the same thing, but this time with "gapps-gb-20110325-signed.zip". After that, at the main menu, press "Reboot system now".

3) Create a Debian image file.
You have two options here. One, create your own (recommended) or two, download mine. I would download mine if you don't have linux and don't plan on getting it or don't really have time to set everything up. First and foremost though, you need to download dl.dropbox.com/u/14791765/debian.zip and unzip it to your SD card. My image is located here if you need it: dl.dropbox.com/u/14791765/debian-img.tar.gz Place it in your "debian" folder on your SD card. Afterwards, do these commands
Code:
cd /mnt/sdcard/debian
tar zxf debian-img.tar.gz
rm debian-img.tar.gz
If you do not want to download the whole 84 Mb file (which uncompresses to 1 Gb), create your own by doing this on Ubuntu Linux:
Code:
sudo -s
apt-get install debootstrap
dd if=/dev/zero of=debian.img seek=1024 bs=1M count=1
mke2fs -F debian.img
mkdir debian
mount -o loop debian.img debian/
debootstrap --verbose --arch armel --foreign lenny debian ftp.us.debian.org/debian
umount debian/

If you need the image file to take up less/more room, change "seek=1024" to "seek=[value-in-Mb]".
Now move your newly created "debian.img" to the "debian" folder on your SD card.

4) Install Debian
Almost done! :)
Back in your root shell, do these commands:
Code:
cd /mnt/sdcard/debian
sh installdebian
sh installdebian2
echo 'deb ftp.us.debian.org/debian squeeze main' > /etc/apt/sources.list
apt-get autoclean && apt-get update
export username="[insertyourfirstnamehere]"
adduser $username (this will ask for some data, put in as much or as little as you'd like)
apt-get install sudo
usermod $username -G sudo
exit
This should blah blah blah about debootstrap and configuring packages. Ignore it. It should finish in about 7-10 minutes. After that is done, the adduser command adds you to the system login files. After you enter "exit", you are all set to run Debian! To start debian, put this in your root shell/terminal emulator:
Code:
bootdebian
Wala! One ready-made LG Optimus V Debian, at your service! From here, you can install pretty much everything for Debian, including XOrg. I may post an update guide for how to install XOrg, VNC, and the like.

EDIT: If "sh installdebian" hangs on "Configuring: sysvinit", just do Control-C, and run it again.
 
Last edited:

niral.naik

Senior Member
Hello! This is my first walkthrough for one of my first accomplishments on my first android phone, the LG Optimus V. This guide will show you how to put debian squeeze into a chroot environment on your Optimus V. Lets get started!

Just a side note before we start:
I am not responsible for any mistake you made/in the hardware/software, so any problems with your phone is your own fault. I recommend backing up before a ROM install.

1) Root your phone.
I will not cover this, but there are many guides to root an Optimus V on Google. Just search it! :)

2) Install Custom Recovery Image (optional if your ROM has ext2 support)
Android 2.2 Froyo currently DOES NOT have ext2 support in the kernel, so we need to install an Android build that does. I used aospCMod, which works flawlessly. Download from dl.dropbox.com/u/14791765/preinstall.zip and unzip it. Move the "preinstall" folder over to your SD card on your Optimus. Now run these commands as root (I recommend using "adb shell" and then running "su" as the shell)
Code:
# The following installs "flash_image" to /system/bin, then makes it executable
cd /mnt/sdcard/preinstall
mount -o remount,rw -t yaffs2 /dev/block/mtdblock5 /system
cat flash_image > /system/bin/flash_image
chmod 755 /system/bin/flash_image
# The following flashes recovery-thunderc-v-1.2.0-GNM.img to recovery
flash_image recovery /mnt/sdcard/preinstall/recovery-thunderc-v-1.2.0-GNM.img
reboot recovery
Your phone should reboot into your newly flashed recovery partition

2.5) Install aospCMod (optional if your ROM has ext2 support)
Now, using the volume rocker, the menu button, and the back button, back up your phone, go to "Backup/Restore" -> "Backup Google proprietary system files" and press menu. This will back up your working system.

Now back at the main menu, navigate to "Flash zip menu" -> "Flash zip from Sdcard" -> "preinstall" -> "aospCMod-VM670-20110601-signed.zip". Install the ROM. Now do the same thing, but this time with "gapps-gb-20110325-signed.zip". After that, at the main menu, press "Reboot system now".

3) Create a Debian image file.
You have two options here. One, create your own (recommended) or two, download mine. I would download mine if you don't have linux and don't plan on getting it or don't really have time to set everything up. First and foremost though, you need to download dl.dropbox.com/u/14791765/debian.zip and unzip it to your SD card. My image is located here if you need it: dl.dropbox.com/u/14791765/debian-img.tar.gz Place it in your "debian" folder on your SD card. Afterwards, do these commands
Code:
cd /mnt/sdcard/debian
tar zxf debian-img.tar.gz
rm debian-img.tar.gz
If you do not want to download the whole 84 Mb file (which uncompresses to 1 Gb), create your own by doing this on Ubuntu Linux:
Code:
sudo -s
apt-get install debootstrap
dd if=/dev/zero of=debian.img seek=1024 bs=1M count=1
mke2fs -F debian.img
mkdir debian
mount -o loop debian.img debian/
debootstrap --verbose --arch armel --foreign lenny debian ftp.us.debian.org/debian
umount debian/

If you need the image file to take up less/more room, change "seek=1024" to "seek=[value-in-Mb]".
Now move your newly created "debian.img" to the "debian" folder on your SD card.

4) Install Debian
Almost done! :)
Back in your root shell, do these commands:
Code:
cd /mnt/sdcard/debian
sh installdebian
sh installdebian2
echo 'deb ftp.us.debian.org/debian squeeze main' > /etc/apt/sources.list
apt-get autoclean && apt-get update
export username="[insertyourfirstnamehere]"
adduser $username (this will ask for some data, put in as much or as little as you'd like)
apt-get install sudo
usermod $username -G sudo
exit
This should blah blah blah about debootstrap and configuring packages. Ignore it. It should finish in about 7-10 minutes. After that is done, the adduser command adds you to the system login files. After you enter "exit", you are all set to run Debian! To start debian, put this in your root shell/terminal emulator:
Code:
bootdebian
Wala! One ready-made LG Optimus V Debian, at your service! From here, you can install pretty much everything for Debian, including XOrg. I may post an update guide for how to install XOrg, VNC, and the like.

EDIT: If "sh installdebian" hangs on "Configuring: sysvinit", just do Control-C, and run it again.
Cool bro
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Hello! This is my first walkthrough for one of my first accomplishments on my first android phone, the LG Optimus V. This guide will show you how to put debian squeeze into a chroot environment on your Optimus V. Lets get started!

    Just a side note before we start:
    I am not responsible for any mistake you made/in the hardware/software, so any problems with your phone is your own fault. I recommend backing up before a ROM install.

    1) Root your phone.
    I will not cover this, but there are many guides to root an Optimus V on Google. Just search it! :)

    2) Install Custom Recovery Image (optional if your ROM has ext2 support)
    Android 2.2 Froyo currently DOES NOT have ext2 support in the kernel, so we need to install an Android build that does. I used aospCMod, which works flawlessly. Download from dl.dropbox.com/u/14791765/preinstall.zip and unzip it. Move the "preinstall" folder over to your SD card on your Optimus. Now run these commands as root (I recommend using "adb shell" and then running "su" as the shell)
    Code:
    # The following installs "flash_image" to /system/bin, then makes it executable
    cd /mnt/sdcard/preinstall
    mount -o remount,rw -t yaffs2 /dev/block/mtdblock5 /system
    cat flash_image > /system/bin/flash_image
    chmod 755 /system/bin/flash_image
    # The following flashes recovery-thunderc-v-1.2.0-GNM.img to recovery
    flash_image recovery /mnt/sdcard/preinstall/recovery-thunderc-v-1.2.0-GNM.img
    reboot recovery
    Your phone should reboot into your newly flashed recovery partition

    2.5) Install aospCMod (optional if your ROM has ext2 support)
    Now, using the volume rocker, the menu button, and the back button, back up your phone, go to "Backup/Restore" -> "Backup Google proprietary system files" and press menu. This will back up your working system.

    Now back at the main menu, navigate to "Flash zip menu" -> "Flash zip from Sdcard" -> "preinstall" -> "aospCMod-VM670-20110601-signed.zip". Install the ROM. Now do the same thing, but this time with "gapps-gb-20110325-signed.zip". After that, at the main menu, press "Reboot system now".

    3) Create a Debian image file.
    You have two options here. One, create your own (recommended) or two, download mine. I would download mine if you don't have linux and don't plan on getting it or don't really have time to set everything up. First and foremost though, you need to download dl.dropbox.com/u/14791765/debian.zip and unzip it to your SD card. My image is located here if you need it: dl.dropbox.com/u/14791765/debian-img.tar.gz Place it in your "debian" folder on your SD card. Afterwards, do these commands
    Code:
    cd /mnt/sdcard/debian
    tar zxf debian-img.tar.gz
    rm debian-img.tar.gz
    If you do not want to download the whole 84 Mb file (which uncompresses to 1 Gb), create your own by doing this on Ubuntu Linux:
    Code:
    sudo -s
    apt-get install debootstrap
    dd if=/dev/zero of=debian.img seek=1024 bs=1M count=1
    mke2fs -F debian.img
    mkdir debian
    mount -o loop debian.img debian/
    debootstrap --verbose --arch armel --foreign lenny debian ftp.us.debian.org/debian
    umount debian/

    If you need the image file to take up less/more room, change "seek=1024" to "seek=[value-in-Mb]".
    Now move your newly created "debian.img" to the "debian" folder on your SD card.

    4) Install Debian
    Almost done! :)
    Back in your root shell, do these commands:
    Code:
    cd /mnt/sdcard/debian
    sh installdebian
    sh installdebian2
    echo 'deb ftp.us.debian.org/debian squeeze main' > /etc/apt/sources.list
    apt-get autoclean && apt-get update
    export username="[insertyourfirstnamehere]"
    adduser $username (this will ask for some data, put in as much or as little as you'd like)
    apt-get install sudo
    usermod $username -G sudo
    exit
    This should blah blah blah about debootstrap and configuring packages. Ignore it. It should finish in about 7-10 minutes. After that is done, the adduser command adds you to the system login files. After you enter "exit", you are all set to run Debian! To start debian, put this in your root shell/terminal emulator:
    Code:
    bootdebian
    Wala! One ready-made LG Optimus V Debian, at your service! From here, you can install pretty much everything for Debian, including XOrg. I may post an update guide for how to install XOrg, VNC, and the like.

    EDIT: If "sh installdebian" hangs on "Configuring: sysvinit", just do Control-C, and run it again.