# [SOLVED] How to boot without initramfs

## bstaletic

Hello,

I'd like to boot without initramfs, but for some reason it has failed. Here are the configurations.

lsblk

```

NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT

sda            8:0    0 298.1G  0 disk 

├─sda1         8:1    0   512M  0 part 

├─sda2         8:2    0    20G  0 part 

├─sda3         8:3    0 277.6G  0 part 

│ └─lvm-home 254:0    0 575.7G  0 lvm  /home

└─sda4         8:4    0  1007K  0 part 

sdb            8:16   0 298.1G  0 disk 

└─sdb1         8:17   0 298.1G  0 part 

  └─lvm-home 254:0    0 575.7G  0 lvm  /home

sdc            8:32   0 149.1G  0 disk 

├─sdc1         8:33   0     2M  0 part 

├─sdc2         8:34   0   200M  0 part /boot

├─sdc3         8:35   0    20G  0 part /

└─sdc4         8:36   0 128.9G  0 part 

sr0           11:0    1  1024M  0 rom 

```

/etc/lilo.conf

```

default=gentoo

timeout=100

lba32

#prompt

compact

boot=/dev/sdc

#install=menu

#vga=0x318

image=/boot/kernel-genkernel-x86_64-3.19.4-hardened

   label=gentoo

   root=/dev/sdc3

   #map=/boot/System.map-genkernel-x86_64-3.19.3-hardened

   initrd=/boot/initramfs-genkernel-x86_64-3.19.4-hardened

```

And here's my kernel config.

Yes, I am using genkernel, but am configuring kernel using menuconfig.

SATA controller driver in use: ATA_PIIX (CONFIG_ATA_PIIX=y)

Block device driver: SCSI (CONFIG_SCSI_MOD=y)

Root/boot filesystem driver: EXT4 (CONFIG_EXT4_FS=y)

With the above lilo configuration I can boot without any issues, but I fail if I comment out the initrd line.

P.S.

lsmod after booting current config

```

Module                  Size  Used by

video                  13258  0 

fan                     4054  0 

xts                     3087  0 

aesni_intel           159517  0 

glue_helper             4481  1 aesni_intel

lrw                     3533  1 aesni_intel

gf128mul                5610  2 lrw,xts

ablk_helper             1844  1 aesni_intel

cryptd                  7640  2 aesni_intel,ablk_helper

aes_x86_64              7375  1 aesni_intel

scsi_transport_iscsi    67784  0 

scsi_transport_fc      43209  0 

```

/etc/fstab

```

# <device>    <mountpoint>   <fs>       <options>       <dump>       <fsck>

/dev/sdc2     /boot       ext4       defaults       0       0

/dev/sdc3     /       ext4       defaults       0       0

/dev/mapper/lvm-home    /home       ext4       defaults       0       0

```

EDIT:

If I use UUID in lilo.conf root entry I boot successfully. Yet if I use /dev/sdc3 I get an error saying there's no appropriate driver, and I get asked to enter root device. Entering /dev/sdc3 continues boot process normally.Last edited by bstaletic on Sun Apr 19, 2015 12:04 am; edited 1 time in total

----------

## eccerr0r

IIRC lilo you need an 

append "root=/dev/xyz" 

to use a different root, and then you can remove the initramfs.

I haven't used lilo in soooo long now, might be out of date info...

----------

## bstaletic

Some progess, though I still need initramfs to boot. Append line has allowed me to boot using root=/dev/sdc3 without manually entering root partition.

Here's the error from no initramfs boot:

http://i.imgur.com/VlQdE22.jpg

http://i.imgur.com/fZ23LOz.jpg

Both are pictures of the same screen. Sorry about the flash, if it gets in the way I'll take another picture tomorow (during the day).

EDIT:

Managed to boot!  :Smile: 

Now there's a problem with resolution and starting X. 

I've booted to my console, but the resolution was something like 800*600 (guestimate), also startx encountered an error. Again booting with initramfs and everything works.

EDIT2:

Boot with no errors accomplished! I just needed to uncomment the map line in lilo.conf.

EDIT3:

Just a few hints for future readers.

Adding System.map is not necessary. Having your video card drivers properly set is (no udev in initramfs to provide additional modules).

Listen to emerge messages, they're there for a reason and can be really helpful.

Compiling video card drivers as modules (as opposed to builing them in) makes it a bit easier.

----------

