Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-27-2009, 12:50 PM   #1
LQ Newbie
Registered: May 2009
Posts: 3

Rep: Reputation: 0
Question Regarding initrd


I was wondering if it was possible to create and initrd that downloads a disk image from an NFS server and dd it to disk? If so how?

Old 05-27-2009, 02:18 PM   #2
Senior Member
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,839
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284
Well, making an initrd in general depends a little on which distro you are using. You can use mkinitrd to make an initrd, but to add anything fancy is more complicated. What follows is more advice than a HOWTO. I'm sure what you want to do is possible.

For example, in slackware, the layout of the initrd is saved under /boot/initrd-tree. If you want to add something, like the dd command, then simply make sure that the command exists in /boot/initrd-tree/bin or sbin, then edit the /boot/initrd-tree/init file to add the command wherever you want it in the boot process. Then rerun the mkinitrd command without parameters to generate a new initrd. Using GRUB, it's pretty easy to test the new initrd without making your system unbootable.

In your case, you will have to make sure your init sets up the network first. If I were doing this, I would study the current boot process and add only the necessary modules. In slackware, for example, you would look at /etc/rc.d/rc.inet1 and 2...

Unfortunately, if you're using a different distro, the details will vary tremendously. There may be no /boot/initrd-tree to conveniently edit. Slackware uses busybox, which is very versatile, but not every distro does.

Hope that helps a bit. Maybe though, what you're trying to do has a better solution. Why is that you want to download and dd?

Last edited by mostlyharmless; 05-27-2009 at 02:20 PM.
Old 05-27-2009, 07:09 PM   #3
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 18,237

Rep: Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712
initrd is init ramdisk and contains extra drivers the kernel needs to see to eg mount the boot disk. Its not a script.


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie Question... Initrd digger95 Slackware 5 10-23-2007 01:35 AM
initrd question lbdgwgt Linux - Newbie 3 11-03-2006 03:35 AM
initrd Question TSquaredF Slackware 5 07-19-2006 04:11 PM
a question about suse initrd aeolus SUSE / openSUSE 5 11-04-2005 10:37 AM
Kernel upgrade - initrd question bradmo Debian 4 06-18-2004 01:03 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:41 AM.

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