Results 1 to 5 of 5
Started with an initrd.gz of 1.9 MB;used 'extract here' (in mint) to get:
initrd; used:
gzip -dc /mnt/casper/initrd.gz -id
to open the initrd making 'new-initrd.' of 2.7 MB;
changing nothing, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-20-2013 #1Just Joined!
- Join Date
- Dec 2008
- Posts
- 3
editing initrd.gz
Started with an initrd.gz of 1.9 MB;used 'extract here' (in mint) to get:
initrd; used:
gzip -dc /mnt/casper/initrd.gz -id
to open the initrd making 'new-initrd.' of 2.7 MB;
changing nothing, repacked using:
find . | cpio --quiet --dereference -o -H newc | gzip -9 > ~/new-initrd.gz
The resulting new initrd.gz was more than thirty megabytes!!!
What am I missing?;
- 02-21-2013 #2Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,744
Hello and welcome!
I think b/c you are de-referencing links, and thus copying the files the links point to. Try the cpio command w/o the --dereference flag.
- 02-21-2013 #3Just Joined!
- Join Date
- Dec 2008
- Posts
- 3
TNX, but I fgured it out:
find . | cpio --create --format='newc' > /path/to/target;
The trick is to execute this line inside the directory where the files to be put in the new initrd(here called target) are. Otherwise, cpio searches
all over for cpio archives; at one point, I got a target initrd of several gigabytes this way!.
By the way, when trying to reboot from the initrd, there is no reboot command present; if use 'exit' produces kernel panic("tried to kill init").
Tried inserting 'reboot' and 'rc.d' which reboot uses into the initrd, but no-go. Is there a simple way to reboot without a cold boot?.
- 02-21-2013 #4Just Joined!
- Join Date
- Dec 2008
- Posts
- 3
To clarify: I am using grub4dos to boot just initrd.gz and vmlinuz;need a way to do a warm-boot from there.
- 02-21-2013 #5Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,744
oh, yeah. i had figured you were in the dir you wanted to archive already. cpio is like tar that way.
so do you actually have a bash shell then? if so, here's a way to force an immediate reboot:By the way, when trying to reboot from the initrd, there is no reboot command present; if use 'exit' produces kernel panic("tried to kill init").
Tried inserting 'reboot' and 'rc.d' which reboot uses into the initrd, but no-go. Is there a simple way to reboot without a cold boot?.
Code:echo b > /proc/sysrq-trigger


Reply With Quote

