OSDev.org https://forum.osdev.org/ |
|
File system https://forum.osdev.org/viewtopic.php?f=13&t=33022 |
Page 1 of 1 |
Author: | grenders22 [ Fri Jun 22, 2018 5:59 am ] |
Post subject: | File system |
I run the file system into ketu. Everything is working. Code: qemu-system-i386 -kernel kernel -hda hda.img Code: fs_init("/dev/hda"); // /dev/hda device name Then I divided the flash drive into two partitions. At first I installed a grub2. The second one for files (ext2). But no device name can be seen. In ubuntu the second section as /dev/sdb2. I do not know what to do, help please. |
Author: | StudlyCaps [ Sat Jun 23, 2018 2:53 am ] |
Post subject: | Re: File system |
You maybe need to give more info, but if your drive is not appearing in Ubuntu but you have a /dev/* entry for it, make sure it's getting mounted (entry in /etc/fstab for example). Linux expects all drives to be explicitly mounted. Edit: Nevermind, I misread the question. |
Author: | Solar [ Mon Jun 25, 2018 8:44 am ] |
Post subject: | Re: File system |
If there is no file corresponding to the partition in /dev, you cannot mount it, because "mount" binds a device to a mount point. No device, no mounting. I am not familiar with QEMU, but I notice that you are handling /dev/hda -- i.e., the whole hard drive. Partitions are numbered -- /dev/hda1, /dev/hda2. Now, it could be totally normal to call fs_init() on /dev/hda, or it could be that you are using the whole hard drive image as a partition, and that you don't have code in place for handling a device (which could hold multiple partitions) at all? (That is actually a rather common issue when using virtual computers -- using the whole disk like one partition. On real hardware, that simply wouldn't work.) |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |