How can I build debian /dev tree on RHEL 4?
Hi,
Does anyone know how I can build a debian /dev tree on a RHEL 4 distribution? This /dev tree is intended to be loaded on an embedded system that has Debian (version 2.4.16). I am building a debian linux system on RedHat (RHEL 4) and loading it on the embedded box. For RedHat, I am aware that udev wil dynamically detect hardware and build the /dev tree. This won't work for me, because I need additional devices created. I need to simulate the /dev tree that will be used on the target Debian box. I have done this on a debian distribution before (that was simple, because it already had the debian devices tree). For instance Redhat does not have: /dev/hda /dev/hda1 /dev/hda2 .... This is what I have tried so far: I made /dev1/dev to simulate /dev and created devices under there. But, now I this command fails: dd if=/dev/zero of=/dev1/dev/ram1 bs=1024 count=93750 Error: dd: writing `/dev1/dev/ram1': No space left on device 16385+0 records in 16384+0 records out $ df -h /dev Filesystem Size Used Avail Use% Mounted on - 8.0G 152K 8.0G 1% /dev $ df -h /dev1 Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 49G 6.4G 40G 14% / $ df -k /dev Filesystem 1K-blocks Used Available Use% Mounted on - 8287176 152 8287024 1% /dev $ df -k /dev1 Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/VolGroup00-LogVol00 50412228 6664212 41187200 14% / $ df -i /dev Filesystem Inodes IUsed IFree IUse% Mounted on - 195044 246 194798 1% /dev $ df -i /dev1 Filesystem Inodes IUsed IFree IUse% Mounted on /dev/mapper/VolGroup00-LogVol00 6406144 182281 6223863 3% / Is it because of dev1's filesystem, or where it is mounted? I made a /dev1/dev and created a devices tree that looks exactly the same as what is on debian (the one that works). Will that work? The dd command failed, so there must be something I am missing or doing wrong. I would appreciate any help! If you think this needs to be posted to a different forum, let me know. Thanks, Supriya |
I would start by creating a partition on which to build and run Debian. Then I would run the Debian installation CD and tell it to put the Debian system into the new partition. Configure your Debian system while you are running Debian. Then when you boot Red Hat you will have a Debian system on the specified partition.
|
Thanks for the suggestion about the partition!
But, is there a way to do it without having to intall debian on a partition? I would like to do this without that. If I can get rid of the dd error, I would make more progress. |
I'm not sure at all I have understood the request :) but isn't MAKEDEV what you want?
MAKEDEV generic will create a minimal debian /dev tree |
That is what I did - used MAKEDEV to create the debian /dev tree but under /dev1/dev
See below: MAKEDEV -v -d /dev1/dev hda create hda b 3 0 root:disk 640 create hda1 b 3 1 root:disk 640 create hda2 b 3 2 root:disk 640 ..... [truncated]... My questions are: 1. Was that the right thing to do in order to duplicate debian's dev tree? 2. How can I debug/fix the errors from the "dd" command? Thanks! |
Quote:
Or directly with mknod, but then you need to know minor and major numbers. Quote:
1024*93750 makes 93MB so its seems like your ramdisk is too small? I have no clue what you are trying to do, sorry :) Do you know the tool debootstrap, it could be usefull for you. "debootstrap testing /my_debian" would install a debian testing on /my_debian At the end of the deboostrap, the directory /my_debian/dev is created and a MAKEDEV generic is done. |
[PARTIALLY SOLVED] How can I build debian /dev tree on RHEL 4
Thanks you!
Looks like builing the /dev tree was not the problem. It was the ram size that was the problem. I kept reducing the size from 96MB and it finally worked reduced the size to be 16MB, and it worked. The error message I got from dd the first time should have clued me to what the problem might be. Worked: ======= dd if=/dev/zero of=/dev1/dev/ram1 bs=1024 count=16000 16000+0 records in 16000+0 records out dd if=/dev/zero of=/dev1/dev/ram1 bs=1024 count=16384 16384+0 records in 16384+0 records out Fails if count is 16385 or greater: ===================================== dd if=/dev/zero of=/dev1/dev/ram1 bs=1024 count=16385 dd: writing `/dev1/dev/ram1': No space left on device 16385+0 records in 16384+0 records out Questions: 1. How can I check the ramsize? 2. How can I increase it to be 96MB? 3. Should I post this as a new thread? Thanks so much for your help! |
All times are GMT -5. The time now is 10:56 PM. |