LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices



Reply
 
Search this Thread
Old 05-16-2014, 04:08 AM   #1
slackgraham
LQ Newbie
 
Registered: Apr 2012
Posts: 10

Rep: Reputation: Disabled
How to modify installation image?


Hi all,
I want to add a script to the standard install image, so that I can script lvm, luks etc at installation time. However, somehow I created an image that hangs during boot. Is there anything completely wrong in what I did? steps as below (this is for usb install):
  1. mount slack iso
  2. copy installation tree to hdd (so that it's writeable)
  3. extract initrd to some directory: zcat initrd.img | cpio -idv
  4. add bespoke installation scripts into the extracted initrd
  5. rebuild initrd.img & put back into the installation tree: find <tree> -print -depth | cpio -ov | gzip > initrd.img
  6. recreate iso acording to <slacktree>/isolinux/READMER.TXT (because I'm doing this on 13.36 for a 14.1 install I used the 13.37 mkisofs recipe (the newer -eltorito.. switches not available).
  7. isohybrid the iso and dd to usb memory stick.
  8. boot a machine from the mem stick and gaze in sadness as it hangs!

regards,
g.
 
Old 05-16-2014, 05:30 PM   #2
slackgraham
LQ Newbie
 
Registered: Apr 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
a bit more detail: the boot hangs with the lines:
RAMDISK: gzip image found at block 0
RAMDISK: incomplete write (404 != 22929)
write error

somewhat inevitably, given the initrd is what I modified.
Presumably I've misunderstood something around the creation of the initrd.img ?
 
Old 05-16-2014, 06:26 PM   #3
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad W520
Posts: 4,681

Rep: Reputation: 1240Reputation: 1240Reputation: 1240Reputation: 1240Reputation: 1240Reputation: 1240Reputation: 1240Reputation: 1240Reputation: 1240
Not sure that's the reason but in any case ishoybrid shipped in Slackware 13.37 don't work on big ISO images, so use that on Slackware 14.1 instead, or modify usbboot.img instead of initrd.img then use the dd command to put the image on an USB stick.
 
Old 05-22-2014, 07:35 AM   #4
slackgraham
LQ Newbie
 
Registered: Apr 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
Thanks Didier.
I did use isohybrid (13.37) on the unmodified iso and was able to install that off the usb stick successfully. Would that have been good luck which ran out on my modified iso?
 
Old 05-23-2014, 05:11 AM   #5
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad W520
Posts: 4,681

Rep: Reputation: 1240Reputation: 1240Reputation: 1240Reputation: 1240Reputation: 1240Reputation: 1240Reputation: 1240Reputation: 1240Reputation: 1240
FYI this is how I unpack an initrd (actually an initramfs):
Code:
mkdir $TMP/initrd
(cd $TMP/initrd
gunzip -cd <path to initrd.img> | cpio -i -d -m -H newc --no-absolute-filenames
)
Probably gzip -cd would give the same results, I didn't try yet. The "-m" option of cpio preserves the modification time.

Semi-blind guess: the command you use to repack the initrd is the culprit. Try this one instead:
Code:
( cd <tree>
find . -print | cpio -o --owner root:root -H newc | gzip -9 > ../isolinux/initrd.img
)
The option "-H newc" could be what you miss.

If that doesn't work, please post the full command you use to build the ISO and if possible upload your initrd on a publicly accessible server so we can have a look at it.

Last edited by Didier Spaier; 05-23-2014 at 10:06 AM.
 
  


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
modify linux iso image xelnt Linux - General 6 07-15-2010 07:41 PM
Inject/modify files in iso image on the fly brianmcgee Linux - Software 10 08-01-2008 03:08 AM
modify an image with GIMP rblampain Linux - Desktop 9 02-05-2008 08:01 AM
program to modify iso image shanenin Linux - Software 6 08-26-2006 07:15 AM
howto modify the image on the screen after logging in?? rohan208 Linux - General 3 07-14-2004 12:48 AM


All times are GMT -5. The time now is 04:38 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration