Discussion:
[gem5-users] How to associate a kernel offset to a linux image for full system simulation?
Kleovoulos Kalaitzidis
2018-07-30 15:00:57 UTC
Permalink
I am trying to setup Gem5 for full system simulation on x86. Following Jason's tutorial, I have generated the image file for ubuntu 18.04.
Then for the kernel I did the following steps (with Jason's config):
make oldconfig
make vmlinux

This creates an executable called vmlinux which I use as the kernel for fs.py. After trying to run it and creating the telnet session, I get the following errors (extracted the end of the messages):

Using kernel 4.8.13:
List of all partitions:
[ callto:0100 16384 | 0100           16384 ] ram0 (driver?)
[ callto:0101 16384 | 0101           16384 ] ram1 (driver?)
[ callto:0102 16384 | 0102           16384 ] ram2 (driver?)
[ callto:0103 16384 | 0103           16384 ] ram3 (driver?)
[ callto:0104 16384 | 0104           16384 ] ram4 (driver?)
[ callto:0105 16384 | 0105           16384 ] ram5 (driver?)
[ callto:0106 16384 | 0106           16384 ] ram6 (driver?)
[ callto:0107 16384 | 0107           16384 ] ram7 (driver?)
[ callto:0108 16384 | 0108           16384 ] ram8 (driver?)
[ callto:0109 16384 | 0109           16384 ] ram9 (driver?)
010a 16384 ram10 (driver?)
010b 16384 ram11 (driver?)
010c 16384 ram12 (driver?)
010d 16384 ram13 (driver?)
010e 16384 ram14 (driver?)
010f 16384 ram15 (driver?)
[ callto:0300 8192000 | 0300         8192000 ] hda driver: ide-gd
[ callto:0301 1024 | 0301            1024 ] hda1 b3e8ba38-c801-461b-a765-d4ccb929b5df
[ callto:0302 8188928 | 0302         8188928 ] hda2 b68ea151-df09-44cf-8b99-0875407a5b25
No filesystem could mount root, tried: ext3 ext4 ext2 fuseblk
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,1)
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.8.13 #1
Hardware name: , BIOS 06/08/2008
0000000000000001 ffffffff811e0a97 ffff88001e5bc000 ffffffff816ea24b
ffffffff810ae1b3 ffff880000000010 ffff88001ec57ec0 ffff88001ec57e58
ffff88001ec57eb0 ffff88001ec57ec8 0000000000000012 0000000000000000
Call Trace:
[<ffffffff811e0a97>] ? dump_stack+0x5d/0x79
[<ffffffff810ae1b3>] ? panic+0xd3/0x20b
[<ffffffff818ad403>] ? mount_block_root+0x2a4/0x2bb
[<ffffffff818ad6fe>] ? prepare_namespace+0x161/0x197
[<ffffffff818ad052>] ? kernel_init_freeable+0x182/0x18b
[<ffffffff8141bbb7>] ? kernel_init+0x5/0xe6
[<ffffffff814207bf>] ? ret_from_fork+0x1f/0x40
[<ffffffff8141bbb2>] ? rest_init+0x69/0x69
Kernel Offset: disabled
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,1)

Using Kernel 4.17.9:
[ 0.413939] VFS: Cannot open root device "hda1" or unknown-block(0,0): error -6
[ 0.413951] Please append a correct "root=" boot option; here are the available partitions:
[ 0.413966] [ callto:0800 8192000 | 0800         8192000 ] sda
[ 0.413967] driver: sd
[ 0.413982] [ callto:0801 1024 | 0801            1024 ] sda1 b3e8ba38-c801-461b-a765-d4ccb929b5df
[ 0.413983]
[ 0.414000] [ callto:0802 8188928 | 0802         8188928 ] sda2 b68ea151-df09-44cf-8b99-0875407a5b25
[ 0.414001]
[ 0.414018] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

The problem seems to be during the creation of the kernel, where I do not install any driver. Jason mentions that I should probably need to install some drivers/software, but they are not specified.
From what I've seen on the internet it is likely to be a filesystem driver missing or an incompatibility of kernel and linux version.

Would anyone be able to give directions on how to understand and solve this issue?
--
Kleovoulos Kalaitzidis
Doctorant - Équipe PACAP

Centre de recherche INRIA Rennes - Bretagne Atlantique
Bâtiment 12E, Bureau E321, Campus de Beaulieu,
35042 Rennes Cedex, France
Ciro Santilli
2018-07-30 15:31:26 UTC
Permalink
Did you try to set the kernel command line option as the kernel suggested?

root=/dev/hda2
root=/dev/sda2

Picking 2 as it is the larger partition.

I recommend always giving the full gem5 command line when posting here.




On Mon, Jul 30, 2018 at 4:00 PM, Kleovoulos Kalaitzidis <
Post by Kleovoulos Kalaitzidis
I am trying to setup Gem5 for full system simulation on x86. Following
Jason's tutorial, I have generated the image file for ubuntu 18.04.
make oldconfig
make vmlinux
This creates an executable called vmlinux which I use as the kernel for
fs.py. After trying to run it and creating the telnet session, I get the
0100 16384 <callto:0100%2016384> ram0 (driver?)
0101 16384 <callto:0101%2016384> ram1 (driver?)
0102 16384 <callto:0102%2016384> ram2 (driver?)
0103 16384 <callto:0103%2016384> ram3 (driver?)
0104 16384 <callto:0104%2016384> ram4 (driver?)
0105 16384 <callto:0105%2016384> ram5 (driver?)
0106 16384 <callto:0106%2016384> ram6 (driver?)
0107 16384 <callto:0107%2016384> ram7 (driver?)
0108 16384 <callto:0108%2016384> ram8 (driver?)
0109 16384 <callto:0109%2016384> ram9 (driver?)
010a 16384 ram10 (driver?)
010b 16384 ram11 (driver?)
010c 16384 ram12 (driver?)
010d 16384 ram13 (driver?)
010e 16384 ram14 (driver?)
010f 16384 ram15 (driver?)
0300 8192000 <callto:0300%208192000> hda driver: ide-gd
0301 1024 <callto:0301%201024> hda1 b3e8ba38-c801-461b-a765-
d4ccb929b5df
0302 8188928 <callto:0302%208188928> hda2
b68ea151-df09-44cf-8b99-0875407a5b25
No filesystem could mount root, tried: ext3 ext4 ext2 fuseblk
Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(3,1)
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.8.13 #1
Hardware name: , BIOS 06/08/2008
0000000000000001 ffffffff811e0a97 ffff88001e5bc000 ffffffff816ea24b
ffffffff810ae1b3 ffff880000000010 ffff88001ec57ec0 ffff88001ec57e58
ffff88001ec57eb0 ffff88001ec57ec8 0000000000000012 0000000000000000
[<ffffffff811e0a97>] ? dump_stack+0x5d/0x79
[<ffffffff810ae1b3>] ? panic+0xd3/0x20b
[<ffffffff818ad403>] ? mount_block_root+0x2a4/0x2bb
[<ffffffff818ad6fe>] ? prepare_namespace+0x161/0x197
[<ffffffff818ad052>] ? kernel_init_freeable+0x182/0x18b
[<ffffffff8141bbb7>] ? kernel_init+0x5/0xe6
[<ffffffff814207bf>] ? ret_from_fork+0x1f/0x40
[<ffffffff8141bbb2>] ? rest_init+0x69/0x69
Kernel Offset: disabled
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,1)
error -6
[ 0.413951] Please append a correct "root=" boot option; here are the
[ 0.413966] 0800 8192000 <callto:0800%208192000> sda
[ 0.413967] driver: sd
[ 0.413982] 0801 1024 <callto:0801%201024> sda1
b3e8ba38-c801-461b-a765-d4ccb929b5df
[ 0.413983]
[ 0.414000] 0802 8188928 <callto:0802%208188928> sda2
b68ea151-df09-44cf-8b99-0875407a5b25
[ 0.414001]
[ 0.414018] Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(0,0)
The problem seems to be during the creation of the kernel, where I do not
install any driver. Jason mentions that I should probably need to install
some drivers/software, but they are not specified.
From what I've seen on the internet it is likely to be a filesystem driver
missing or an incompatibility of kernel and linux version.
Would anyone be able to give directions on how to understand and solve this issue?
--
Kleovoulos Kalaitzidis
Doctorant - Équipe PACAP
Centre de recherche INRIA Rennes - Bretagne Atlantique
Bâtiment 12E, Bureau E321, Campus de Beaulieu,
35042 Rennes Cedex, France
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Kleovoulos Kalaitzidis
2018-07-31 14:18:07 UTC
Permalink
Hello,
thank you for your reply. Sorry for not mentioning the gem5 command, I thought I could omit it since
it is the basic/default. So, the command line is :
build/X86/build.opt configs/example/fs.py --kernel=/path_to_kernel --disk-image==/path_to_image

In the fs.py file the command line option for kernel was already set to : root=/dev/hda1 by default,
and you were right I changed that to the existing partition. But I am still facing a segfault .
Hence, I will try to tackle it in another angle and if i find something specific and useful I will reply again.
Thanks again.
--
Kleovoulos Kalaitzidis
Doctorant - Équipe PACAP

Centre de recherche INRIA Rennes - Bretagne Atlantique
Bâtiment 12E, Bureau E321, Campus de Beaulieu,
35042 Rennes Cedex, France




From: "Ciro Santilli" <***@gmail.com>
To: "gem5 users mailing list" <gem5-***@gem5.org>
Sent: Monday, July 30, 2018 5:31:26 PM
Subject: Re: [gem5-users] How to associate a kernel offset to a linux image for full system simulation?




BQ_BEGIN

Did you try to set the kernel command line option as the kernel suggested?

root=/dev/hda2
root=/dev/sda2

Picking 2 as it is the larger partition.

I recommend always giving the full gem5 command line when posting here.




On Mon, Jul 30, 2018 at 4:00 PM, Kleovoulos Kalaitzidis < [ mailto:***@inria.fr | ***@inria.fr ] > wrote:

BQ_BEGIN

I am trying to setup Gem5 for full system simulation on x86. Following Jason's tutorial, I have generated the image file for ubuntu 18.04.
Then for the kernel I did the following steps (with Jason's config):
make oldconfig
make vmlinux

This creates an executable called vmlinux which I use as the kernel for fs.py. After trying to run it and creating the telnet session, I get the following errors (extracted the end of the messages):

Using kernel 4.8.13:
List of all partitions:
[ callto:0100%2016384 | 0100           16384 ] ram0 (driver?)
[ callto:0101%2016384 | 0101           16384 ] ram1 (driver?)
[ callto:0102%2016384 | 0102           16384 ] ram2 (driver?)
[ callto:0103%2016384 | 0103           16384 ] ram3 (driver?)
[ callto:0104%2016384 | 0104           16384 ] ram4 (driver?)
[ callto:0105%2016384 | 0105           16384 ] ram5 (driver?)
[ callto:0106%2016384 | 0106           16384 ] ram6 (driver?)
[ callto:0107%2016384 | 0107           16384 ] ram7 (driver?)
[ callto:0108%2016384 | 0108           16384 ] ram8 (driver?)
[ callto:0109%2016384 | 0109           16384 ] ram9 (driver?)
010a 16384 ram10 (driver?)
010b 16384 ram11 (driver?)
010c 16384 ram12 (driver?)
010d 16384 ram13 (driver?)
010e 16384 ram14 (driver?)
010f 16384 ram15 (driver?)
[ callto:0300%208192000 | 0300         8192000 ] hda driver: ide-gd
[ callto:0301%201024 | 0301            1024 ] hda1 b3e8ba38-c801-461b-a765-d4ccb929b5df
[ callto:0302%208188928 | 0302         8188928 ] hda2 b68ea151-df09-44cf-8b99-0875407a5b25
No filesystem could mount root, tried: ext3 ext4 ext2 fuseblk
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,1)
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.8.13 #1
Hardware name: , BIOS 06/08/2008
0000000000000001 ffffffff811e0a97 ffff88001e5bc000 ffffffff816ea24b
ffffffff810ae1b3 ffff880000000010 ffff88001ec57ec0 ffff88001ec57e58
ffff88001ec57eb0 ffff88001ec57ec8 0000000000000012 0000000000000000
Call Trace:
[<ffffffff811e0a97>] ? dump_stack+0x5d/0x79
[<ffffffff810ae1b3>] ? panic+0xd3/0x20b
[<ffffffff818ad403>] ? mount_block_root+0x2a4/0x2bb
[<ffffffff818ad6fe>] ? prepare_namespace+0x161/0x197
[<ffffffff818ad052>] ? kernel_init_freeable+0x182/0x18b
[<ffffffff8141bbb7>] ? kernel_init+0x5/0xe6
[<ffffffff814207bf>] ? ret_from_fork+0x1f/0x40
[<ffffffff8141bbb2>] ? rest_init+0x69/0x69
Kernel Offset: disabled
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,1)

Using Kernel 4.17.9:
[ 0.413939] VFS: Cannot open root device "hda1" or unknown-block(0,0): error -6
[ 0.413951] Please append a correct "root=" boot option; here are the available partitions:
[ 0.413966] [ callto:0800%208192000 | 0800         8192000 ] sda
[ 0.413967] driver: sd
[ 0.413982] [ callto:0801%201024 | 0801            1024 ] sda1 b3e8ba38-c801-461b-a765-d4ccb929b5df
[ 0.413983]
[ 0.414000] [ callto:0802%208188928 | 0802         8188928 ] sda2 b68ea151-df09-44cf-8b99-0875407a5b25
[ 0.414001]
[ 0.414018] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

The problem seems to be during the creation of the kernel, where I do not install any driver. Jason mentions that I should probably need to install some drivers/software, but they are not specified.
From what I've seen on the internet it is likely to be a filesystem driver missing or an incompatibility of kernel and linux version.

Would anyone be able to give directions on how to understand and solve this issue?
--
Kleovoulos Kalaitzidis
Doctorant - Équipe PACAP

Centre de recherche INRIA Rennes - Bretagne Atlantique
Bâtiment 12E, Bureau E321, Campus de Beaulieu,
35042 Rennes Cedex, France

_______________________________________________
gem5-users mailing list
[ mailto:gem5-***@gem5.org | gem5-***@gem5.org ]
[ http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users | http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users ]

BQ_END



_______________________________________________
gem5-users mailing list
gem5-***@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
BQ_END
Yunxia Zhu
2018-08-01 07:59:51 UTC
Permalink
Hello Kleovoulos Kalaitzidis,


I have the same problem. I want to setup Gem5 for FS mode on x86 with new
linux version. I also tried to associate 4.18.13 kernel to 18.04.1 image
and I had the same problem. Could you tell how you solve it? Thank you very
much.


with best regards
Yunxia Zhu
Ciro Santilli
2018-08-01 09:18:05 UTC
Permalink
I have the following advice: start with this setup that just works:
https://github.com/cirosantilli/linux-kernel-module-cheat/tree/38c3a7b9697e1845a67eea75409a33523314c927#gem5

Then if you need, replace the disk image that it uses with your own Ubuntu
disk image. I think it will likely just work as well.
Post by Yunxia Zhu
Hello Kleovoulos Kalaitzidis,
I have the same problem. I want to setup Gem5 for FS mode on x86 with new
linux version. I also tried to associate 4.18.13 kernel to 18.04.1 image
and I had the same problem. Could you tell how you solve it? Thank you very
much.
with best regards
Yunxia Zhu
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Kleovoulos Kalaitzidis
2018-09-11 15:53:04 UTC
Permalink
Hello,
this is an older thread and the beginning of my effort to set up FS simulation for running SPEC benchmarks on x86 gem5.

To do that, I totally followed the instructions given by Jason in his site : http://www.lowepower.com/jason/setting-up-gem5-full-system.html
and I created an image of ubuntu-16.04 and the kernel version 4.8.13(using the config file provided by Jason). I also installed in the image
the needed gem5-guest-tools. I can normally boot my image with qemu so then I went through to check that gem5 is also booting, before I
use any .rcS files.

I run the gem5 cmd: ./build/X86gem5.opt ./configs/example/fs.py --kernel=path_to_kernel --disk-image=path_to_ubuntu_image --cpu-type=AtomicSimpleCPU -n 1 --mem-size=2GB -fastmem --sys-clock=4GHz --cpu-clock=4GHz
and then I do the telnet connection in another shell : telnet 127.0.0.1 3456

The connection is normally attached and the boot process starts. In around 10 min the file system is mounted and also the message
"Welcome to Ubuntu.16.04" appears. Though, the boot process is not done yet and it keeps going for a lot of time. After around 5 hours
it prints the message :
Started gem5 init script.
Starting Set console scheme...

And then "Connection closed by foreign host" because on the part of the shell that gem5 cmd was executed, the command was killed.
Except from the part that at the end the image did not boot, it even got 5 hours to reach this point. On my web search, it is mentioned
that the boot up process normally would take 30 min. Can somebody help me on what I miss here please? Taking so long to boot
(and not booting also after all) does not seem to be normal. Has anybody built a linux image and a kernel that they play along together
and work normally with gem5. I would be grateful if somebody could give me his advice.

Thank you very much in advance,
--
Kleovoulos Kalaitzidis
Doctorant - Équipe PACAP

Centre de recherche INRIA Rennes - Bretagne Atlantique
Bâtiment 12E, Bureau E321, Campus de Beaulieu,
35042 Rennes Cedex, France
Sent: Tuesday, July 31, 2018 4:18:07 PM
Subject: Re: [gem5-users] How to associate a kernel offset to a linux image for
full system simulation?
Hello,
thank you for your reply. Sorry for not mentioning the gem5 command, I thought I
could omit it since
build/X86/build.opt configs/example/fs.py --kernel=/path_to_kernel
--disk-image==/path_to_image
root=/dev/hda1 by default,
and you were right I changed that to the existing partition. But I am still
facing a segfault .
Hence, I will try to tackle it in another angle and if i find something specific
and useful I will reply again.
Thanks again.
--
Kleovoulos Kalaitzidis
Doctorant - Équipe PACAP
Centre de recherche INRIA Rennes - Bretagne Atlantique
Bâtiment 12E, Bureau E321, Campus de Beaulieu,
35042 Rennes Cedex, France
Post by Kleovoulos Kalaitzidis
Sent: Monday, July 30, 2018 5:31:26 PM
Subject: Re: [gem5-users] How to associate a kernel offset to a linux image for
full system simulation?
Did you try to set the kernel command line option as the kernel suggested?
root=/dev/hda2
root=/dev/sda2
Picking 2 as it is the larger partition.
I recommend always giving the full gem5 command line when posting here.
On Mon, Jul 30, 2018 at 4:00 PM, Kleovoulos Kalaitzidis < [
Post by Kleovoulos Kalaitzidis
I am trying to setup Gem5 for full system simulation on x86. Following Jason's
tutorial, I have generated the image file for ubuntu 18.04.
make oldconfig
make vmlinux
This creates an executable called vmlinux which I use as the kernel for fs.py.
After trying to run it and creating the telnet session, I get the following
[ callto:0100%2016384 | 0100           16384 ] ram0 (driver?)
[ callto:0101%2016384 | 0101           16384 ] ram1 (driver?)
[ callto:0102%2016384 | 0102           16384 ] ram2 (driver?)
[ callto:0103%2016384 | 0103           16384 ] ram3 (driver?)
[ callto:0104%2016384 | 0104           16384 ] ram4 (driver?)
[ callto:0105%2016384 | 0105           16384 ] ram5 (driver?)
[ callto:0106%2016384 | 0106           16384 ] ram6 (driver?)
[ callto:0107%2016384 | 0107           16384 ] ram7 (driver?)
[ callto:0108%2016384 | 0108           16384 ] ram8 (driver?)
[ callto:0109%2016384 | 0109           16384 ] ram9 (driver?)
010a 16384 ram10 (driver?)
010b 16384 ram11 (driver?)
010c 16384 ram12 (driver?)
010d 16384 ram13 (driver?)
010e 16384 ram14 (driver?)
010f 16384 ram15 (driver?)
[ callto:0300%208192000 | 0300         8192000 ] hda driver: ide-gd
[ callto:0301%201024 | 0301            1024 ] hda1
b3e8ba38-c801-461b-a765-d4ccb929b5df
[ callto:0302%208188928 | 0302         8188928 ] hda2
b68ea151-df09-44cf-8b99-0875407a5b25
No filesystem could mount root, tried: ext3 ext4 ext2 fuseblk
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,1)
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.8.13 #1
Hardware name: , BIOS 06/08/2008
0000000000000001 ffffffff811e0a97 ffff88001e5bc000 ffffffff816ea24b
ffffffff810ae1b3 ffff880000000010 ffff88001ec57ec0 ffff88001ec57e58
ffff88001ec57eb0 ffff88001ec57ec8 0000000000000012 0000000000000000
[<ffffffff811e0a97>] ? dump_stack+0x5d/0x79
[<ffffffff810ae1b3>] ? panic+0xd3/0x20b
[<ffffffff818ad403>] ? mount_block_root+0x2a4/0x2bb
[<ffffffff818ad6fe>] ? prepare_namespace+0x161/0x197
[<ffffffff818ad052>] ? kernel_init_freeable+0x182/0x18b
[<ffffffff8141bbb7>] ? kernel_init+0x5/0xe6
[<ffffffff814207bf>] ? ret_from_fork+0x1f/0x40
[<ffffffff8141bbb2>] ? rest_init+0x69/0x69
Kernel Offset: disabled
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,1)
[ 0.413939] VFS: Cannot open root device "hda1" or unknown-block(0,0): error -6
[ 0.413951] Please append a correct "root=" boot option; here are the available
[ 0.413966] [ callto:0800%208192000 | 0800         8192000 ] sda
[ 0.413967] driver: sd
[ 0.413982] [ callto:0801%201024 | 0801            1024 ] sda1
b3e8ba38-c801-461b-a765-d4ccb929b5df
[ 0.413983]
[ 0.414000] [ callto:0802%208188928 | 0802         8188928 ] sda2
b68ea151-df09-44cf-8b99-0875407a5b25
[ 0.414001]
[ 0.414018] Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(0,0)
The problem seems to be during the creation of the kernel, where I do not
install any driver. Jason mentions that I should probably need to install some
drivers/software, but they are not specified.
From what I've seen on the internet it is likely to be a filesystem driver
missing or an incompatibility of kernel and linux version.
Would anyone be able to give directions on how to understand and solve this issue?
--
Kleovoulos Kalaitzidis
Doctorant - Équipe PACAP
Centre de recherche INRIA Rennes - Bretagne Atlantique
Bâtiment 12E, Bureau E321, Campus de Beaulieu,
35042 Rennes Cedex, France
_______________________________________________
gem5-users mailing list
[ http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users |
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users ]
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Loading...