You can circumvent the grub-install bug by substituting a USB memory for the 
disk image. 


发自 网易邮箱大师
在2016年03月09日 00:56,Patrick 写道:
The problem is caused by the command below



mkfs -t vfat /dev/loop0


/dev/loop0 is the whole disk, and /dev/loop0p1 is the partition.


The command make a file system on the disk, thus overrides the disk’s partition 
table.  


I guess that it is the partition on which you want to make a filesystem.
The right command is 


      mkfs -t ext2 /dev/loop0p1


We prefer ext2,3,4 to fat32 on linux.




​I see. Thanks! ​I used kpartx to map the partitions in /dev/mapper. If you 
know of a better way of doing what you suggest, could you please let me know?


I was hoping to use ext4, but I wasn't able to grub-install to a loopback 
device. When I try to, I get the error:


> grub-install: error: disk `lvm/loop1p1' not found.



​From a searching around, it looks like this issue has been visited recently by 
the developers:


https://lists.gnu.org/archive/html/grub-devel/2015-05/msg00011.html


So I wasn't able to get it to work. So instead I've been using syslinux, which 
I believe requires FAT, rather than EXT. I read about extlinux, but from my 
reading, I've gotten the impression that syslinux has more history. So I 
figured it would be easier to find useful material for syslinux on message 
boards.


Thanks again for all your help! I hope that at some point I'll be able to do 
more, such as customize the ram disk, the init system, and figure out how to 
get the system switched over to a root file system on a disk.


-Patrick
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to