Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] How to boot without initramfs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
bstaletic
Apprentice
Apprentice


Joined: 05 Apr 2014
Posts: 225

PostPosted: Sat Apr 18, 2015 9:00 pm    Post subject: [SOLVED] How to boot without initramfs Reply with quote

Hello,

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

lsblk
Code:

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
Code:

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
Code:

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
Code:

# <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
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7116
Location: almost Mile High in the USA

PostPosted: Sat Apr 18, 2015 10:56 pm    Post subject: Reply with quote

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...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
bstaletic
Apprentice
Apprentice


Joined: 05 Apr 2014
Posts: 225

PostPosted: Sat Apr 18, 2015 11:48 pm    Post subject: Reply with quote

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! :)
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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum