LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 01-09-2007, 10:35 AM   #1
SupriyaS
LQ Newbie
 
Registered: Jan 2007
Distribution: RHEL 4
Posts: 5

Rep: Reputation: 0
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
 
Old 01-09-2007, 11:06 AM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
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.
 
Old 01-09-2007, 11:15 AM   #3
SupriyaS
LQ Newbie
 
Registered: Jan 2007
Distribution: RHEL 4
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
Old 01-09-2007, 11:41 AM   #4
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
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
 
Old 01-09-2007, 01:12 PM   #5
SupriyaS
LQ Newbie
 
Registered: Jan 2007
Distribution: RHEL 4
Posts: 5

Original Poster
Rep: Reputation: 0
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!
 
Old 01-10-2007, 12:21 PM   #6
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Quote:
Originally Posted by SupriyaS
My questions are:
1. Was that the right thing to do in order to duplicate debian's dev tree?
Well, its what I was doing when working on embended systems.
Or directly with mknod, but then you need to know minor and major numbers.
Quote:
2. How can I debug/fix the errors from the "dd" command?
bs=1024 count=93750
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.
 
Old 01-10-2007, 02:47 PM   #7
SupriyaS
LQ Newbie
 
Registered: Jan 2007
Distribution: RHEL 4
Posts: 5

Original Poster
Rep: Reputation: 0
[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!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to build the kernel tree on the system? Nishant Desai Linux - Kernel 24 12-01-2006 08:05 PM
RHEL 4 update 2 - kernel build problem bbell Red Hat 3 04-20-2006 10:26 PM
Build versus Test on RHEL revisions (WS, ES, AS) ken.lim Red Hat 3 04-05-2006 06:21 AM
I need ls -la /dev for a RHEL rhelserver Linux - Newbie 4 10-08-2004 04:40 PM
where is linux source build directory/kernel source tree? webazoid Linux - Software 2 07-01-2004 08:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 11:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration