I followed the steps here and compiled the kernel successfully in usermode:https://btrfs.wiki.kernel.org/index.php/Debugging_Btrfs_with_GDBBut when I start ./linux in various ways it always gives me a very similar error: pc@linux-94q0:~/linux-4.11-rc4> ./linux root=/mntCore dump limits :    soft - 0    hard - NONEChecking that ptrace can change system call numbers...OKChecking syscall emulation patch for ptrace...OKChecking advanced syscall emulation patch for ptrace...OKChecking environment variables for a tempdir...none foundChecking if /dev/shm is on tmpfs...OKChecking PROT_EXEC mmap in /dev/shm...OKAdding 33251328 bytes to physical memory to account for exec-shield gapLinux version 4.11.0-rc4 (pc@linux-94q0) (gcc version 4.8.5 (SUSE Linux) ) #1 Fri Mar 31 12:40:07 CEST 2017Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16087Kernel command line: root=/mntPID hash table entries: 256 (order: -1, 2048 bytes)Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)Inode-cache hash table entries: 4096 (order: 3, 32768 bytes)Memory: 26140K/65240K available (3518K kernel code, 770K rwdata, 948K rodata, 114K init, 195K bss, 39100K reserved, 0K cma-reserved)NR_IRQS:15clocksource: timer: mask: 0xffffffffffffffff max_cycles: 0x1cd42e205, max_idle_ns: 881590404426 nsCalibrating delay loop... 6966.47 BogoMIPS (lpj=34832384)pid_max: default: 32768 minimum: 301Mount-cache hash table entries: 512 (order: 0, 4096 bytes)Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes)Checking that host ptys support output SIGIO...YesChecking that host ptys support SIGIO on close...No, enabling workarounddevtmpfs: initializedUsing 2.6 host AIOclocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 nsfutex hash table entries: 256 (order: 0, 6144 bytes)xor: measuring software checksum speed   8regs     : 19749.600 MB/sec   8regs_prefetch: 17312.000 MB/sec   32regs    : 18694.400 MB/sec   32regs_prefetch: 17317.600 MB/secxor: using function: 8regs (19749.600 MB/sec)NET: Registered protocol family 16raid6: int64x1  gen()  4139 MB/sraid6: int64x1  xor()  2318 MB/sraid6: int64x2  gen()  3758 MB/sraid6: int64x2  xor()  2685 MB/sraid6: int64x4  gen()  3413 MB/sraid6: int64x4  xor()  2153 MB/sraid6: int64x8  gen()  2865 MB/sraid6: int64x8  xor()  1626 MB/sraid6: using algorithm int64x1 gen() 4139 MB/sraid6: .... xor() 2318 MB/s, rmw enabledraid6: using intx1 recovery algorithmclocksource: Switched to clocksource timerVFS: Disk quotas dquot_6.6.0VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)NET: Registered protocol family 2TCP established hash table entries: 512 (order: 0, 4096 bytes)TCP bind hash table entries: 512 (order: 0, 4096 bytes)TCP: Hash tables configured (established 512 bind 512)UDP hash table entries: 256 (order: 1, 8192 bytes)UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)NET: Registered protocol family 1console [stderr0] disabledmconsole (version 2) initialized on /home/pc/.uml/y33GMV/mconsoleChecking host MADV_REMOVE support...OKworkingset: timestamp_bits=62 max_order=13 bucket_order=0io scheduler noop registeredio scheduler deadline registered (default)io scheduler mq-deadline registeredNET: Registered protocol family 17Initialized stdio console driverConsole initialized on /dev/tty0console [tty0] enabledInitializing software serial port version 1console [mc-1] enabledFailed to initialize ubd device 0 :Couldn't determine size of device's fileBtrfs loaded, crc32c=crc32c-generic, debug=onVFS: Cannot open root device /mnt or unknown-block(0,0): error -6Please append a correct root= boot option; here are the available partitions:Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)CPU: 0 PID: 1 Comm: swapper Not tainted 4.11.0-rc4 #1Stack: 6381bd80 60066344 602a250a 62cab500 602a250a 600933ba 6381bd90 60297e6f 6381beb0 60092b41 6381be30 60380ea1Call Trace: [<600933ba>] ? printk+0x0/0x94 [<6001c4d8>] show_stack+0xfe/0x158 [<60066344>] ? dump_stack_print_info+0xe1/0xea [<602a250a>] ? bust_spinlocks+0x0/0x4f [<602a250a>] ? bust_spinlocks+0x0/0x4f [<600933ba>] ? printk+0x0/0x94 [<60297e6f>] dump_stack+0x2a/0x2c [<60092b41>] panic+0x173/0x322 [<60380ea1>] ? klist_next+0x0/0xa6 [<600929ce>] ? panic+0x0/0x322 [<600cac33>] ? kfree+0x0/0x8a [<600f01da>] ? SyS_mount+0xae/0xc0 [<600933ba>] ? printk+0x0/0x94 [<600f012c>] ? SyS_mount+0x0/0xc0 [<60002378>] mount_block_root+0x356/0x374 [<6029e3f9>] ? strcpy+0x0/0x18 [<60002432>] mount_root+0x9c/0xa0 [<6029e543>] ? strncmp+0x0/0x25 [<60002614>] prepare_namespace+0x1de/0x238 [<600eb9d3>] ? SyS_dup+0x0/0x5e [<60001ee1>] kernel_init_freeable+0x300/0x31b [<600933ba>] ? printk+0x0/0x94 [<603835e9>] kernel_init+0x1c/0x14a [<6001b140>] new_thread_handler+0x81/0xa3Aborted (core dumped)I have now tried everything I could think of to satisfy the ./linux root= option but nothing seems to work. I created a root filesystem with https://buildroot.org/, passed that as .gz, .tar, .tar.gz, uncompressed folderI put the contents of the buildroot.org into the btrfs loop device, then right clicked in the disks utility and created an .img file. Tried starting with that.Of course I tried all the usual options I could think of, like ./linux root=/mnt, ./linux root=/dev/loop0I don't know what else to try. Why is this not working?I tried finding out what the -6 error code means, but it seems all the Linux kernel error codes are positive numbers.https://gist.github.com/nullunar/4553641I really don't know what else to do, I guess I could start reading up for hours and hours about what exactly the udb stuff means, but I was really hoping somebody could just tell me what I need to pass to the command line as my interest right now is only in debugging btrfs, not Linux in general.
How do I run the usermode linux kernel?
linux kernel;btrfs;vfs;user mode linux
From https://www.linux.com/news/how-run-linux-inside-linux-user-mode-linux :./linux-2.6.19-rc5 ubda=FedoraCore5-x86-root_fs mem=128MThe ubda parameter in this command is giving the UML kernel the name of a file to use to create the virtual machine's /dev/ubda virtual block device, which will be its root filesystem. 