LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Network and grub (https://www.linuxquestions.org/questions/slackware-14/network-and-grub-892941/)

dspjm 07-21-2011 08:14 AM

Network and grub
 
I am new to install slackware, i am using scientific linux 6 and first, I don't know how to detect the wireless network and I don't know how to write the grub in my sl, I define the kernel to /boot/vmlinuz, which is a symbolic link, linking to the large single user mode, how can I use different kernels and it's easy to load the kernel but the config file, how should i edit the grub.conf

Woodsman 07-21-2011 09:49 AM

Regarding GRUB:

You can use the /boot/vmlinuz sym link for one of the systems, but to boot the other system you will need to use the full name of that particular kernel.

Perhaps the following will help:

Installing GRUB
Multibooting Tips

dspjm 07-21-2011 10:01 AM

Yes, but when I switch the kernel to for instance vmlinuz-generic-2.6.37*, it tells me impossible to find the root directory, I think that's because it didn't load the right configure file, config-generic-2.6.37*,and the System.map-generic-2.6.37*...

Woodsman 07-21-2011 11:06 AM

Is your /boot file system on a separate partition or part of each operating system's file system? If /boot is part of each operating system's file system, then the menu.lst/grub.conf needs to be defined as such.

For example, if Slackware is installed on /dev/sda1 and /boot is part of that file system partition, then the location in grub to the Slackware kernel is something like this:

kernel (hd0,0)/boot/vmlinuz-2.6.33.15-smp-1

If SL6 is on the same drive but partition sda2, then the kernel location for that system would look something like this:

kernel (hd0,1)/boot/vmlinuz-2.6.33.15-smp-1

If /boot is a separate partition, say the first partition, then the configuration would look something like this:

kernel (hd0,0)/vmlinuz-2.6.33.15-smp-1

The menu.lst/grub.conf kernel directive is different from the root directive. The kernel directive provides the location of the kernel file. The root directive provides the location of the operating system.

Thus, if Slackware is located on sda1 and SL6 on sda2, the respective root directives would be like this:

root=/dev/sda1
root=/dev/sda2

The kernel and root locations are not necessarily the same place. For example, on my systems I use a separate partition for /boot. Therefore my kernel files are all located in a different location than the operating system partitions.

gnashley 07-21-2011 12:17 PM

If you use any of the kernels name *generic*, then you nee to use an initrd with it since the kernel does not include any filesystem support. The initrd will load the correct kernel modules to add that support at boot-time.

dspjm 07-22-2011 12:38 AM

This is my grub file

Code:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/sda3
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default saved
timeout=30
fallback 0
splashimage=(hd0,0)/grub/splash.xpm.gz
title Scientific Linux (2.6.32-131.0.15.el6.i686)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-131.0.15.el6.i686 ro root=UUID=972b0fcb-ae43-4e62-8772-e40c34100101 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet
        initrd /initramfs-2.6.32-131.0.15.el6.i686.img
        savedefault

title Slackware Linux
        root (hd0,5)
        kernel (hd0,5)/boot/vmlinuz ro root=/dev/sda6
        savedefault fallback

This is my list of file in '/boot' of slackware
Code:

.
..
boot.0806
boot_message.txt
config
config-generic-2.6.37.6
config-generic-smp-2.6.37.6-smp
config-huge-2.6.37.6
config-huge-smp-2.6.37.6-smp
diag1.img
diag2.img
map
README.initrd
slack.bmp
System.map
System.map-generic-2.6.37.6
System.map-generic-smp-2.6.37.6-smp
System.map-huge-2.6.37.6
System.map-huge-smp-2.6.37.6-smp
vmlinuz
vmlinuz-generic-2.6.37.6
vmlinuz-generic-smp-2.6.37.6-smp
vmlinuz-huge-2.6.37.6
vmlinuz-huge-smp-2.6.37.6-smp

the README.initrd is a bad file. And it must not be an intrid.

how should i write the grub.conf?

if i load the vmlinuz-generic* for kernel, it can load it, but it says can't mount the root directory on an unknown block.

gnashley 07-22-2011 02:47 AM

*Read* the file README.initrd for instructions on how to *create* the initrd that you need. In fact AlienBob supplied a script (command) which can generate the command-line needed to generate your initrd using the mkinitrd command. There are surely many threads in this forum section which will guide you to boot using a generic kernel.

As I said, the generic kernels do not include file-system support (ext3,ext4, etc). The initrd you create matches the filesystem you have on '/' and includes and loads the kernel module for that filesystem.

dspjm 07-22-2011 07:45 AM

Thank you for answering my question, I have solved the grub problem according to your post.
Here's my solution

first, login as root
second, install the mkinitrd if you haven't have it yet, it's in /slackware/a of the disc.
third, use mkinitrd to create your initrd.gz
last, load the initrd.gz in your grub.

hope it help the others

and i find it's still necessary to login as a user in cli first. slackware doesn't provide a gui login interface.
but, I still can get to the wireless network, the driver is ok, but I don't know how to connect to the network around me.

gnashley 07-22-2011 08:31 AM

"slackware doesn't provide a gui login interface" It does, if you have installed the kde series and edit /etc/inittab to use default runlevel 4 instead of 3.

Richard Cranium 07-22-2011 09:37 AM

Or add 4 to the kernel line(s) in your grub.conf file.

Woodsman 07-22-2011 10:51 AM

Quote:

and i find it's still necessary to login as a user in cli first. slackware doesn't provide a gui login interface.
Perhaps the following will help:

Configuring Slackware for a GUI and a Command Line Startup

The default login manager for Slackware is KDM, the KDE login manager. If KDE is not installed then Slackware defaults to XDM.


All times are GMT -5. The time now is 03:52 AM.