| |

VerySource

 Forgot password?
 Register
Search
View: 2014|Reply: 2

How to mount the initrd.img file? mount: you must specify the filesystem type

[Copy link]

2

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-10-9 15:30:01
| Show all posts |Read mode
I want to make a linux booted from a USB flash drive, and follow the steps above:
Create initrd.img file
# mkdir -p /mnt/initrd
# cd /tmp
# mkinitrd /tmp/initrd.gz 2.6.18
2. Unzip the initrd.img file and modify the startup script linuxrc
# gunzip initrd.gz
# mount -o loop /tmp/initrd /mnt/initrd
At this step it will appear: mount: you must specify the filesystem type
How to specify the file system can not be mounted,
I also tried to generate 2.6.18.img file,
Then mv 2.6.18.img 2.6.18.gz
Then use gunzip to decompress, but it won't work.
What is it going to do?
Reply

Use magic Report

0

Threads

23

Posts

15.00

Credits

Newbie

Rank: 1

Credits
15.00

 China

Post time: 2020-10-9 17:15:01
| Show all posts
Your file is a cpio file, not an image file
You can use file initrd to see the file type.
Starting with Fedora Core 3, the default initrd image has become a compressed cpio archive file. We no longer use the loop device to mount initrd as a compressed image, but can use it as a cpio archive file
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-10-10 12:15:01
| Show all posts
cp LOADER.BIN boot.img
over!
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list