LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


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

Rep: Reputation: 0
Question Regarding initrd


Hello,

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?

Thanks,
 
Old 05-27-2009, 02:18 PM   #2
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,851
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
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,355

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


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 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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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