The time now is Sun 31 Jul 2016, 05:55
All times are UTC - 4
Joined: 02 Aug 2005
|Posted: Tue 02 Aug 2005, 20:00 Post subject:
adding raid modules to image.gz (AKA initrd; ramdisk image)
I'm trying to get raid working on a USB thumb drive running Puppy 1.0.4. I think I'm at the point where I know enough to be dangerous but not enough to be versed at Linux. Some help would be appreciated.
1. It looks like raid has been conpiled into the kernel. I see mdstat under /proc.
2. I see that raid 0/1/5 is compiled in the kernel as modules (/lib/modules/config-2july05-2.4.29-pup1.0.4)
3. I downloaded modules-2.4.29-complete.tar.gz and uncompressed the subdir kernel/drivers/md/<all the raid modules> to a hard drive. The USB thumb drive is running Puppy on this PC.
4. I launched save2image.
5. I get this:
BusyBox v0.60.5 (2004.09.18-02:04+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
This script was written for the particular situation of Puppy
installed on a USB memory device, usually a Flash card, and
you want to edit the file image.gz
The installation of Puppy on a Flash card is such that image.gz
is just a file on the card, along with vmlinuz and all the files
and folders of your home directory.
When Puppy is booted, the Flash card is mounted on /root, and
image.gz can be found at /root/image.gz
Your home device is sda1
Uncompressing image.gz to /dev/ram1...
24576+0 records in
24576+0 records out
Need to be a bit cautious here. Older versions of Puppy, before
v0.7.6 I think, used the minix filesystem for image.gz, whereas
Puppy is now using ext2.
this script assumes that image.gz is a ext2 filesystem -- if it
is minix or something else, you will need to edit this script.
(be careful, the filesystem used for image.gz is not necessarily
the same as the filesystem of the partition mounted on /root!)
Mounting /dev/ram1 on /mnt/ram1...
Use a file-manager such as Rox to copy any files to
/mnt/ram1. When finished, Press ENTER key to continue...
(or CTRL-C to abort):
6. First question. There is a statement "Uncompressing image.gz to /dev/ram1...". /dev/ram does not exist. There is a /mnt/ram1. Is /dev/ram1 a mistype and the correct location should be /mnt/ram1?
7. If the correct location is /mnt/ram1, is the correct location of the md subdir and raid files /mnt/ram1/lib/modules/2.4.29/md? I see other subdirs with modules at this location.
8. How would I find out the correct subdir/file locations of other modules that are not included in the puppy .iso but are in the modules-2.4.29-complete.tar.gz? An example would help.
9. I looked in /mnt/ram1/lib/modules/2.4.29/modules.dep to see if there are any dependencies for the raidX.o files and found none. Can somebody confirm that this is correct?
10. If /mnt/ram1/lib/modules/2.4.29/md is the correct location to put the raid modules, and I copy the raid files to this location, they do not have the .gz extention like other modules in surrounding subdirs. EX: /mnt/ram1/lib/modules/2.4.29/ide/ide-cd.o.gz vs. /mnt/ram1/lib/modules/2.4.29/md/raid1.o(no .gz extenstion) does this matter? Should I compress the raid modules before I copy them to the /mnt/ram1/lib/modules/2.4.29/md subdir.
If so, I find this confusing. Why compress files that will be compressed when the image.gz file is created?
11. This is my stopping point at the moment. I know I will have to install/use raidtools or mdadm. I need to know the above details first before I can continue. Again any help would be appreciated.
|Posted: Wed 03 Aug 2005, 11:11 Post subject:
Clues about what some Linux file names mean
Ok I'll try answering
6. /dev/ram1 does exist
will confirm this
7 /mnt/ram1/lib/modules/2/4/29/ is the correct place to add any modules you want to include.
8 See above
9. Now this is where some depmod magic is required
#depmod -b /mnt/ram1/lib/modules/
#depmod -b /mnt/ram1/lib/modules/2.4.29
memory fades me at the moment
To find the dependencies you will have to look in the modules.dep file in modules-2.4.29-complete.tar.gz and copy the files across.
10. When the system boots the ramdisk image (image.gz, or initrd as it is also called) is uncompressed. The reason the modules are compressed is so they take up less space on the uncompressed ramdisk....I know it sounds a little confusing.......if you want to compress the modules you can
# cd /mnt/ram1/lib/modules/2.4.29/md
# gzip -9 *
I hope this helps
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Powered by phpBB © 2001, 2005 phpBB Group