LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-18-2009, 09:40 AM   #1
robertkey
LQ Newbie
 
Registered: Jan 2008
Location: Somerset West, South Africa
Distribution: Debian testing amd64
Posts: 24

Rep: Reputation: 15
Question How do I build the initrd.gz for booting debian hd-media?


Hi I wondered if there was a script or how to build the root file system initrd.gz image released by debian daily images for booting off hd-media. I would like to be able to build initrd.gz myself. I know that one can download them from the debian web site.
Thanks,
Rob Key
 
Old 10-18-2009, 05:42 PM   #2
dchost
LQ Newbie
 
Registered: Oct 2009
Posts: 18

Rep: Reputation: 2
Quote:
Originally Posted by robertkey View Post
Hi I wondered if there was a script or how to build the root file system initrd.gz image released by debian daily images for booting off hd-media. I would like to be able to build initrd.gz myself. I know that one can download them from the debian web site.
Thanks,
Rob Key


debootstrap lenny /mnt/"xx" (make basic rootfs on hd-media)
chroot /mnt/"xx" (mount point hd-media)
apt-get install mkinitrd-tools
mkinitrd ?
 
Old 10-18-2009, 06:06 PM   #3
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Nope, thats mkinitramfs these days.
Code:
mkinitramfs -o initrd.img-<kernelversion> <kernelversion>
Do not ommit the 2nd <kernelversion> entry in the command! Otherwise it'll fail during boot! (yep, been there...) If you use the 2.6.31.4 kernel (latest stable yesterday) this is the command:
Code:
mkinitramfs -o initrd.img-2.6.31.4 2.6.31.4
 
Old 10-18-2009, 10:38 PM   #4
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
update-initramfs -c -k <kernel_version>
 
Old 10-19-2009, 01:47 AM   #5
robertkey
LQ Newbie
 
Registered: Jan 2008
Location: Somerset West, South Africa
Distribution: Debian testing amd64
Posts: 24

Original Poster
Rep: Reputation: 15
Thanks but what about the debian-installer? I want to make the exact same image as
http://people.debian.org/~joeyh/d-i/...edia/initrd.gz
which can be used for booting an iso image residing on the disk.
Thanks
 
Old 10-19-2009, 01:57 AM   #6
robertkey
LQ Newbie
 
Registered: Jan 2008
Location: Somerset West, South Africa
Distribution: Debian testing amd64
Posts: 24

Original Poster
Rep: Reputation: 15
I have been booting debian from my usb flash drive. From grub2 I have done

menuentry "Debian GNU/Linux, Install i386" {
loopback loop (hd0,5)/debian-images/testing/debian-testing-i386-DVD-1.iso
linux (loop)/install.386/vmlinuz findiso=/debian-images/testing/debian-testing-i386-DVD-1.iso nopat boot=live noeject noprompt
initrd (loop)/install.386/initrd.gz isofrom=/dev/sda5/debian-images/testing/debian-testing-i386-DVD-1.iso
}
The problem with this is the initrd.gz tries to mount the cdrom which then fails. The image build by debian at
http://people.debian.org/~joeyh/d-i/...edia/initrd.gz
works perfectly. I want to build this EXACT SAME initrd.gz myself so I can install debian from the usb flash drive.

By changing the initrd.gz line to this
initrd /initrd.gz
I can then boot the live image. I generated initrd.gz by using the live-helper or another method where you use a script called 'moo' which I got off the debian wiki. If I use the said initrd.gz image from debian I can install debian from usb. But I really want to build the initrd.gz myself instead of download it.
Thanks
Rob Key
 
Old 10-26-2009, 04:31 AM   #7
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
hi

I am getting a 404 error against your link to initrd.gz

2) Any chance of a link to moo script?

3) Whereever you got that script...you can unpack and modify it.

but me thinks that only works with limited distros.....the script inside the initrd...is what causes your kernel (linux) line to use .....boot=live
and so you may find...you actually have a script on that distro called live.

I am looking wider at booting any distro and having some fails due to this issue.

I have a partial wiki here if you wish to peruse to see where I am coming from?
http://sidux.com/index.php?module=Wi...g=Grub2isofrom
 
Old 12-02-2009, 12:27 AM   #8
robertkey
LQ Newbie
 
Registered: Jan 2008
Location: Somerset West, South Africa
Distribution: Debian testing amd64
Posts: 24

Original Poster
Rep: Reputation: 15
Thanks for the reply, sorry I took so long to reply! Been developing debian stuff. The link is just to the current hd-media image for the weekly build (i386). It changes every week as the bring out a new one. Moo doesn't work with the newer distros. unionfs has changed to aufs. One can update this in the script but it still fails. Instead of moo I have changed to live-helper. Took a while to figure out how to set up local repositories from dvd images mounted on the loop device. This gives me a customizable live image. I download the initrd.gz each week, but I would like to be able to build initrd.gz to do an install from a local dvd image mounted on the loop device without having to download it. I also use grub-pc (grub2) for the live system. Works well.
Thanks for the info.
Rob Key
 
Old 12-02-2009, 12:29 AM   #9
robertkey
LQ Newbie
 
Registered: Jan 2008
Location: Somerset West, South Africa
Distribution: Debian testing amd64
Posts: 24

Original Poster
Rep: Reputation: 15
Just checkedout your links. Great and thanks.
Rob Key

Last edited by robertkey; 12-04-2009 at 12:48 AM.
 
  


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
any advantage to booting with a initrd? james2b Slackware 7 02-09-2009 03:45 AM
kernel 2.6.18: booting without initrd launcelot Linux - General 3 09-19-2008 01:12 PM
creating vmlinuz and initrd on distribution media tkmsr Linux - Kernel 4 10-24-2007 01:13 PM
Booting problem, initrd Drassk Linux - Software 3 03-06-2005 01:56 PM
problems booting new initrd levicc00123 Slackware 1 10-28-2004 11:57 PM

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

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