Active Topics

 


Reply
Thread Tools
Posts: 838 | Thanked: 292 times | Joined on Apr 2010
#21
Originally Posted by kingoddball View Post
Ok.. Maybe I am now up for this idea... Ignore my first post!
LETS DO IT!
Has anyone created a 2GB ext3 loop back?

(Taken and adapted from Meego)

Creating a loopback image from a tarball
Code:
Create 2GB image file 
dd if=/dev/zero of=/home/user/MyDocs/fedora-image bs=1024 count=2097152

Create filesystem on image file 
mkfs.ext3 /home/user/MyDocs/fedora-image

Create mount point and loopback mount the image 
export FEDORA_ROOT="/mnt/fedora_root"
mkdir $FEDORA_ROOT
mount -o loop /home/user/MyDocs/fedora-image $FEDORA_ROOT
Code:
apt-get install tar-gnu

gtar -tzf <fedora-image>

gtar -xzf <fedora-image> -C $FEDORA_ROOT

umount $FEDORA_ROOT
None of the above may actually work. It's just an idea, Qole would be the best for this....

But!! I want to help! FEDORA!
As close as I got. funny I still can't even get it chroot on my sd card. as noted below yum/rpm not working and after exit of chroot a df in maemo shows lots of "hanging" (looking for nonexistant?) mountpoints.

chroot fedora
remember to use gnu tools (ie gtar and gdd) not the busybox stuff
get bzip image
make a final destination folder (I made /.fedora)
make a loopable 2gb ext2 image file to do this do (in /home/user/MyDocs)

* gdd if=/dev/zero of=/home/user/MyDocs/fedora.img bs=1024 count=2097152
* mkfs.ext2 /home/user/MyDocs/fedora.img


now you have an empty 2G loopable ext2 file called fedora.img
mount the file (I made a directory called /mnt/fedmount). remember the process is mount the file as a loop device and copy the contents of the downloaded fedora file system directory to this. once unmounted you will have transferred the root file system to the /home/user/MyDocs/fedora.img file from the downloaded file using the /mnt/fedmount (or whatever) as your middleman.

* qmount /home/user/MyDocs/fedora.img /mnt/fedmount ----- please note this is qmount not mount

* cp /home/user/MyDocs/rootfs-f12.tar.bz2 /mnt/fedmount
* cd /mnt/fedmount
* gtar -xjf rootfs-f12.tar.bz2


now you cd into rootfs-f12 and copy everything there (cp -ar * ../) up one directory, then rm -rf both rootfs-f12 and rootfs-f12.tar.bz2 (you need to get rid of the tar file and the top level dir holding the file system).

* umount /mnt/fedmount (please not this is regular umount now qumount
* qchroot /home/user/MyDocs/fedora.img /.fedora


then you are chrooted in.
umount (or was it qumount?) leaves things hanging in df... (ie looking for mountpoints that are not there and the only way to clear the output is to reboot phone).
 
Posts: 838 | Thanked: 292 times | Joined on Apr 2010
#22
obviously I am too noob for now and still need help. ok I took a 4gb sd card out of my old phone. I plug n900 into the pc (ubuntu). I see the 4gb partition as /dev/sdc1. I do fdisk /dev/sdc1 and create 3 partitions. 1 (cause jebber says put fat to shut up maemo) is type fat32 type c 100m . 2 is linux type 83 3gb. 3 is type swap apx 1gb.

root@ubnuntu:~# fdisk /dev/sdc1

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').

Command (m for help): p

Disk /dev/sdc1: 3959 MB, 3959456256 bytes
4 heads, 16 sectors/track, 120833 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x69737369

Device Boot Start End Blocks Id System
/dev/sdc1p1 1 3201 102424 c W95 FAT32 (LBA)
/dev/sdc1p2 3202 101506 3145760 83 Linux
/dev/sdc1p3 101507 120833 618464 82 Linux swap / Solaris


Command (m for help):

next (this confuses me) I do a regular fdisk -l and I think I will see all those partitions but I just see the sdc1 listed as such.

Disk /dev/sdc: 3965 MB, 3965190144 bytes
128 heads, 63 sectors/track, 960 cylinders
Units = cylinders of 8064 * 512 = 4128768 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 959 3866656+ b W95 FAT32
Partition 1 has different physical/logical endings:
phys=(959, 127, 63) logical=(958, 127, 63)


so at this point, before I get to copying the or untarring the fedora file system....I am confused. shouldn't fdisk -l show me 3 partitions now? one fat one ext3 and one swap?

I have tried to make a file system on /dev/sdc1p2 but it says "device does not exist".
 
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#23
Nono.. you did that wrong.

Using fdisk you don't pass it a partition.. you pass it a device.

Code:
fdisk /dev/sdc
NOT

Code:
fdisk /dev/sdc1
... I don't even know what that second one would do or how you would use any of those partitions. Maybe it automatically made them extended partitions instead of primary....

Anyway. Do it the first way above.
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#24
Sorry for not chipping in earlier on this.

I haven't been around a whole lot the past few weeks.

I have tried the Fedora 12 chroot but I couldn't see any advantages over Debian. They have compiled far fewer packages and there doesn't seem to be anything in Fedora that isn't also available for Debian. So I've never offered an Easy Fedora package, even though it wouldn't be very hard to make.

If you make a Fedora image file like in kingoddball's instructions, you can just point your Easy Debian to the image file (change the IMGFILE= line in your /home/user/.chroot) and then use Easy Debian to access Fedora. You can even copy some of the N900 specific stuff from the Debian image to your Fedora image and get it doing all the same stuff...

(EDIT: Yes, you can also put Fedora in a partition on your SD card and use it with Easy Debian)

But honestly, other than a preference for Red Hat, what is the advantage of running Fedora instead of Debian?
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!

Last edited by qole; 2010-08-13 at 15:54.
 

The Following 2 Users Say Thank You to qole For This Useful Post:
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#25
Originally Posted by qole View Post
But honestly, other than a preference for Red Hat, what is the advantage of running Fedora instead of Debian?
Like he mentioned earlier the management styles and tools are different.

Having an RPM based Distro to play with as well as a Deb-based system allows you to keep up on the quirks that are different between Red Hat and.... the rest of the planet.
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 

The Following User Says Thank You to fatalsaint For This Useful Post:
Posts: 838 | Thanked: 292 times | Joined on Apr 2010
#26
exactly. for instance I am not saying redhat/centos/fedora is better. Actually it may be worse. but like it or not if I want to study say networking services for a job interview, there is like a 99% chance the will ask me about redhat style quirks not debian style quirks. For example I have a book called "pro linux system administration" I am reading. each chapter details both the debian/ubuntu way of doing things and the redhat/fedora way. take apache for example. the way things are layed out and enabled are totally different between the two.

I personally love the stuff easy debian makes possible like iceweasel etc and dont need that dujplicated. I just would love to have the ability to work with core linux services with a foot in both major camps...the debian and the redhat.

thanks for listening. off to repartition my sd card thanks fatalsaint.
 

The Following User Says Thank You to extendedping For This Useful Post:
Posts: 838 | Thanked: 292 times | Joined on Apr 2010
#27
well thanks guys I am into crippled fedora

quole get on you white horse

please
 
kingoddball's Avatar
Posts: 1,187 | Thanked: 816 times | Joined on Apr 2010 @ Australia
#28
Why not take another route... Easy Ubuntu - Using MuhammadAG's build?

Qole: are you able to install two instances of easy debian? i dont want to mess with easy debian, flawless how it is. if we can make another start program or install a second easy debian, we could get both running
__________________
The thanks button? Sure! You can press it! I would!

Last edited by kingoddball; 2010-08-13 at 23:59.
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#29
yeah, you can even have multiple chroots open simultaneously. I currently am working on a Meego chroot and using Easy Debian to do it.

If you want a second system (Ubuntu, Fedora, Meego) open at the same time as Easy Debian, use a command line like this one to chroot into Meego Handset:

Code:
sudo qchroot /home/user/MyDocs/meego-handset.img.ext3 /.meego su user
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 

The Following 2 Users Say Thank You to qole For This Useful Post:
Posts: 838 | Thanked: 292 times | Joined on Apr 2010
#30
why open ubuntu when it is based off deban?
 
Reply


 
Forum Jump


All times are GMT. The time now is 01:17.