1

I am new to file system. I have file system file with name rootfs.ext3 and when I mount it to some directory , I don't see any "sda" directory into it so that this file system file could be mounted on linux partition.

mount -o loop rootfs.ext3 /media/fuse/

ls

bin  examples  init   libexec   lost+found  proc  sbin32  tmp
dev  home      lib     mnt      root  share   usr
etc  include   mnth    sbin      var

Could any one please point me out how could I provide /dev/sda to this file system file rootfs.ext3 ?

Thanks

  • This is confused. Your rootfs.ext3 is a file which contains a disk image. You mount it using loop mounting, which create a virtual device. /dev/sda is a physical disk (and a whole one, not a partition) --- it's not provided by any image, it's the kernel itself that create it on boot. – Rmano Aug 27 '15 at 07:40
  • Rmano , I would like to know what I should provide in my bootargs for root device if it is mounted on loop device? – Amit Singh Tomar Aug 27 '15 at 07:59
  • Ah, ok. So your question is "How can I boot linux from a disk image?", correct? It's surely possible with a virtual machine: http://askubuntu.com/questions/64915/how-do-i-install-ubuntu-on-a-virtualbox-client-from-an-iso-image and maybe (but quite complex --- not trivial at all) for a real machine: http://askubuntu.com/questions/121212/using-a-bootable-live-cd-disk-image-mounted-on-the-hard-drive --- you should think about changing the question if this is the case. – Rmano Aug 27 '15 at 08:48

1 Answers1

1

With the command

mount -o loop rootfs.ext3 /media/fuse/

you have already mounted a loop device via the file rootfs.ext3, that contains a file system image. The file system is mounted in /media/fuse.

A.B.
  • 90,397