maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Alternatives (https://talk.maemo.org/forumdisplay.php?f=36)
-   -   [Debian] Need Help using Easy-Debian from an EXT2 Partition. (https://talk.maemo.org/showthread.php?t=22669)

BrentDC 2008-08-08 19:34

[Debian] Need Help using Easy-Debian from an EXT2 Partition.
 
What I'm trying to do is use Debian in a chroot from an ext2 partition. Now I know how to install Debian to a partition, and I know how to install Easy-Debian, but not install Easy-Debian to a ext2 partition [not an img file].

You may ask why?

Well, chrooting Debian from an actual partition is waaaaaay faster than from an img file, and Qole's img files are ~1GB -- I can have a partition as large as I want.

You may also ask, why not just install regular Debian to a partition, like Johnx's one for example, and chroot into it?

I tried this, and it just didn't work well. For one, APT was broken, and it just seems that except for being slow, Qole's Easy-Debian just 'works'.

So what I did was freshly format my ext2 partition, and edited /sbin/debian and removed all the mount lines. Like:

Code:

#Make the tablet's devices available to Debian
  echo .
  mount -o bind /dev "$CHROOT/dev"
  mount -o bind /proc "$CHROOT/proc"

  #Gentoo wiki says this will make X work
  echo ..
  mount -t devpts none "$CHROOT/dev/pts"
  mount -o bind /tmp "$CHROOT/tmp"

  #Various external devices
  echo ...
  #FIXME: Should get these from /proc/mounts...
  mount -o bind /media/mmc1 "$CHROOT/media/mmc1"
  mount -o bind /media/mmc2 "$CHROOT/media/mmc2"
  mount -o bind /media/usb "$CHROOT/media/usb"

  #Mount the user's home dir
  echo ....
  mount -o bind /home/user "$CHROOT/home/user"

I got ride of all that.

I then ran Debian-Chroot from the application launcher, and let it mount the debian-img.ext2 image to /debian/

I then copied everything from /debian/ to my ect2 partition.

I then edited the /home/user/.chroot file to look like this:

Code:

# Sample config for chroot

# Device or image containing Debian filesystem.
# Default: first in /media/mmc[12]/debian*.img*
IMGFILE=/dev/mmcblk1p2

# Filesystem used; must always be set when using a partition.
# Default: from extension of IMGFILE, or ext2.
IMGFS=ext2

# Mount point for Debian.
# Default: /debian
CHROOT=/debian

# New /tmp dir size for printing / PDF creation
# Default: 2M
TMPSIZE=2M

# Debian user to drop privileges
# Default: user
DEBUSER=user

I basically just pointed it to my ext2 partition (/dev/mmcblk1p2).

I then rebooted, and changed /sbin/debian back to what it was originally, and tried my chroot out.

It seemingly mounts my ext2 partition to /debian/, but NOTHING WORKS! Gah! :(

What did I do wrong? Is my whole logic wrong? Help...

fatalsaint 2008-08-08 19:43

Re: Need Help using Easy-Debian from an EXT2 Partition.
 
If you run just the "Debian Chroot" icon you should get a terminal that shows a bunch of output..

Copy that output and show us here if you can..

Or if it disapears too fast... open a terminal; get to root; and just run "debian" ... see where the errors are.

U didn't need to modify the debian script at all.. if all you wanted to do was mount the img file and copy the data... as root you could have mount myext2.img /debian and copied .. that way not messing with the original scripts... But anyway.. the process you outlined should have been fine.

If you DO get into a chroot using just "debian"... then try launching something from the maemo user account in a terminal like: debbie abiword

Check the output from that command and see where it's failing.

BrentDC 2008-08-08 19:53

Re: Need Help using Easy-Debian from an EXT2 Partition.
 
Running 'debian' as root gives:

Code:

chroot set up already!
Everything set up, running chroot...
chroot: cannot execute /bin/sh: No such file or directory

Then running 'debbie abiword':

Code:

Starting Debian abiword
But nothing happens, it just goes back to the root prompt.

fatalsaint 2008-08-08 19:56

Re: Need Help using Easy-Debian from an EXT2 Partition.
 
Code:

chroot: cannot execute /bin/sh: No such file or directory
That's not good... the chroot is not working because it is saying it either can't find; or I'd venture can't execute the /bin/sh.

I think when you copied it it didn't copy over permissions... did you use cp -pr or just cp when you ran the copy from the image to the new ext2??

I think everything in your new debian is probably owner:group root:root and rw-r-r or something similar..

ETA: if this is the case.. it will be easier to start over and run the cp with -pr as root instead of fixing these permissions by hand.

BrentDC 2008-08-08 20:03

Re: Need Help using Easy-Debian from an EXT2 Partition.
 
I used Emelfm2 as root to copy the files. For example, the files in /debian/bin are owner:root group:root and permissions:-rwxr-xr-x, but some files' permissions are different.

fatalsaint 2008-08-08 20:04

Re: Need Help using Easy-Debian from an EXT2 Partition.
 
specifically what are /debian/bin/sh?

BrentDC 2008-08-08 20:08

Re: Need Help using Easy-Debian from an EXT2 Partition.
 
/debian/bin/sh is owner:root group:root and permissions:lrwxrwxrwx.

fatalsaint 2008-08-08 20:10

Re: Need Help using Easy-Debian from an EXT2 Partition.
 
Sorry... what is the permissions on /debian/bin/bash .. sh is a link.

BrentDC 2008-08-08 20:13

Re: Need Help using Easy-Debian from an EXT2 Partition.
 
/debian/bin/bash is owner:root group:root and permissions:-rwxr-xr-x.

fatalsaint 2008-08-08 20:14

Re: Need Help using Easy-Debian from an EXT2 Partition.
 
If you manually run:

chroot /debian

Do you get the same error?


All times are GMT. The time now is 15:18.

vBulletin® Version 3.8.8