LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-27-2002, 01:03 AM   #1
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
dd: bs=2X , count=?X


Hi all. I am following a how-to on creating a bootable cd of an lfs system. One of the commands is this:

dd if=/dev/zero of=$LFS/boot/initrd bs=1024 count=6144
mke2fs -m 0 -i 1024 -F $LFS/boot/initrd

but that didn't give me enough space to put the libraries and executables that I needed in $LFS/boot/initrd, so I simply doubled the bs= and count= values, as well as the -i value for mke2fs.

Is that the correct way to do it? I'm wondering, because when I try to boot the cd now, I get this:

vfs: mounted root (ext2 filesystem) readonly
Freeing unused kernel memory: 88k freed
attempt to access beyond end of device
01:00: rw=0 want 16390, limit= 16384
ext2-fs error (device ramdisk (1,0)): ext2_read_inode: unable to read inode block
-inode=8194, block=16389
warning: unable to open an initial console
attempt to access beyond end of device
01:00: rw=0 want 16390, limit= 16384
ext2-fs error (device ramdisk (1,0)): ext2_read_inode: unable to read inode block
-inode=8193, block= 16389
kernel panic: no init found. try passing init= option to kernel

B.T.W.(if it makes a difference)- when I had the system I am burning booted, I mounted /dev/loop0 onto /mnt and got this from df:

df -h /mnt
size used avail
3.9M 1.3K 3.8M


Any help with this would be greatly appreciated.

-Adam
 
Old 10-27-2002, 08:18 AM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
How much have you increased count? It's the size of image, but it must not be bigger than kernel RAMDISK size. Chek in kernel configuration how big can it be. Correct me if I'm wrong.
 
Old 10-27-2002, 04:28 PM   #3
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Original Poster
Rep: Reputation: 30
I doubled the count value, because I doubled the bs value. It looks like that was the wrong thing to do, because bs is the size of each block? well, I did it again with

dd if=/dev/zero of=$LFS/boot/initrd bs=1024 count=12288 (doubled from before)
mke2fs -m 0 -i 1024 -F $LFS/boot/initrd

OOH by the way... the next step is to mount $LFS/boot/initrd to $LFS/mnt and put everything needed in it (some executables, and some libraries, and a startup script:

mount -o loop $LFS/boot/initrd $LFS/mnt

ok, well... when I doubled the count value and not the bs value, it still doesn't give me enough space for what need in there (I just quadrupled the count value and it works... but I don't know if that'll solve my problem).

Also, after putting everything in there, you gzip it.

the kernel says that "default ramdisk size= 4096"

but the config file for isolinux (the bootloader we're using) says this:

default bootcd

label bootcd
kernel lfskernel
append initrd=initrd.gz root=/dev/ram0 init=/linuxrc ramdisk_size=16384

#####################################################

ok, well I was just trying to give you a little more info. This is all way over my head, but I think I'm slowly starting to get some of it. I am going to allow ramdisk on my current system right now, and try passing that "ramdisk_size=16384" message to it from lilo.conf

I'll post when/if I get anywhere. Please reply if you have any suggestions.

thanks in advance

-Adam

p.s.- the how-to I'm trying to figure out is here:
http://hints.linuxfromscratch.org/hi...ot-cd_easy.txt

(huh! easy... right :-)
 
Old 10-27-2002, 07:18 PM   #4
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Original Poster
Rep: Reputation: 30
I GOT IT WORKING!!!!

ok, so I guess when I doubled both the bs and the count values, I was really X4'ing the filesystem I made.

so I left bs the same and quadrupled the count value (like I said before) and I X4'd the amount of ramdisk that was being passed to the kernel.... now the system boots!!

so, no... you weren't wrong. Thanks for the insight.

-Adam
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Link count value? jch02140 Linux - Newbie 1 07-18-2005 11:44 PM
word count pantera Programming 2 08-31-2004 07:23 AM
how to count files disorderly Linux - Newbie 5 08-24-2004 01:36 PM
Code Count liguorir Programming 1 04-24-2004 01:56 PM
Should posts in general count on your post count? Joey.Dale General 16 01-27-2004 01:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:49 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