Jump to content

lilo, grub, booting from a thumb drive.... scared.


wa4chq

Recommended Posts

Hey all....my questions never end!

 

When I bought my current lappy, a Lenovo E420 it came with Windows ?? The first thing I did was partition the HD and install Archbang. This was several years ago. Well several years ago I hosed Windows doing while doing what I do best, messing with Linux and not taking notes.... :) so I just had AB working, which at the time was fine. But Slackware kept calling me and I decided a couple of years ago to put Slack on the lappy, along side AB. I was a little concerned with running liloconfig cuz I didn't want to mess up anything so I declined running lilo and just boot slack from a thumb drive. (If I want to run Archbang, I don't use the flash drive and boot with Grub. I really don't use AB anymore but I'd like to keep it on the laptop and have the option of using it. I've used lilo and messed with it a long time ago but I'm getting old and cranky and don't wanna hose anything. Maybe I should just be happy that what I have but it would be nice not to have to plug the flash drive in to run Slack.

 

One option would be edit Grub and dual boot that way. Or I could run liloconfig and hope it sees AB and when I hit ENTER and run "lilo" or whatever I do after editing lilo that it works and this old man will be happy. Should I be scared? :(, should I just go for it? B) or should I just leave it cuz it works? :wub: If I could test drive liloconfig without committing myself, that would be great.....

Thanks..... :ph34r:

Link to comment
Share on other sites

securitybreach

Well the development of Lilo ceased as of Dec 2015 so I wouldn't consider that an option anymore:

 

NOTE: I have finished development of LILO at December 2015 because of some limitations (e.g. with BTFS, GPT, RAID). If someone want to develop this nice software further, please let me know ...

 

 

https://lilo.alioth.debian.org/

Link to comment
Share on other sites

securitybreach

Personally if all you are booting are linux partitions, I would go with syslinux as it is simple to configure. Otherwise grub is a good option..

Link to comment
Share on other sites

Hi Securitybreach....thanks for the reply. I mentioned lilo because that is what Slackware uses by default. After I posted my question I got to thinking that if I did run "liloconfig" and for some reason doesn't work, wouldn't I still be able to boot Slackware using my usb boot stick?

I'll look into syslinux you mentioned. I don't think I've used it before. Also, I'll get some info about editing grub. I know grub detects and asks about what to do with another linux partion but it's been a while since I edited it. I'll check into it.

All right, have a great morning.....damp here with temps in the upper 40's.

  • Like 1
Link to comment
Share on other sites

OK, well bit the bullet and dove into it....booted Archbang and googled "editing Arch grub". Found their "Grub - ArchWiki" and scrolled down to "Dual-booting". Then as root, dove into /etc/grub.d/40_custom and added:

menuentry "Other Linux" {
set root=(hd0,2)
linux /boot/vmlinuz (add other options here as required)
initrd /boot/initrd.img (if the other kernel uses/needs one)
}

and changed 2 to 5. Not sure what I'm doing, I then ran:

# grub-mkconfig -o /boot/grub/grub.cfg

I noticed as info went flying past my eyes something saying that Slackware was found.......but didn't see 5! saw it saying found on partion 1..... Oh, well, I backed up the original "40_custom"...and held my breath and rebooted. Grub pops up, Archbang is there and so is Slackware.......scrolled down to it, pressed enter and what do you know??? It worked!! Now I just to clean up grub so it reads easier, possibly putting Slackware at the top of the list, Archbang second.....adjust the timeout....etc......well, glad I didn't hose anything!

I did check out syslinux but wasn't sure if that was just another bootstick.....

have a great day!

  • Like 1
Link to comment
Share on other sites

securitybreach

Awesome :thumbsup:

 

Syslinux is just another boot loader like grub or lilo but it just uses a simple configuration file and is a lot lighter than grub.

  • Like 1
Link to comment
Share on other sites

V.T. Eric Layton

Uh-huh... couldn't wait for the ol' Slacker to pop in and state his case, huh? Well, that's OK. I know what it's like to be an impatient old fart these days. ;)

 

I think I'll state my case, anyway...

 

LILO is no longer in development; that's true. However, it still works fine unless you need it to do some of that fancy-schmancy carp that Josh posted in that quote of his above. Just as Pat V. decided to go with Pulse Audio in Slackware 14.2, I'm sure he'll get around to switching to GRUB in one of the upcoming versions... unless, of course, some Slacker dev like Eric Hameleers or Robby Workman tinkers with LILO to modernize it. That's always a possibility.

 

Now, as to your issue, Neil... GRUB is great, but like with all new things, old folks don't like change. When GRUB went to v.2, I stopped using it. I actually had GRUB v.1 running in Slack at one time years ago. For the last few years, I've been running LILO exclusively. The reason being, back in the old days when I was running numerous distros on my systems, GRUB was easier to configure to boot them all. Now, I only have Slack and Windows (for gaming only) on my systems, with the exception of ericsshop02-wifi, which also has Debian and Ubuntu on it. I keep up with them because I have family/friends whom I've converted to Linux, and that's what they use (Debian based distros... Ubuntu, Mint, etc.). So, if you wanna' use GRUB, go ahead. It'll work fine.

 

As for using LILO, you'd have to manually edit the /etc/lilo.conf file to add your ArchBang specific info below Slackware's in the section starting with "#Linux bootable partitions begin", like this:

 

image= /boot/vmlinuz-<version numbers here>
root = /dev/<your ArchBang partition here, hda1, sda1, etc.>
label = ArchBang
read-only

 

NOTE: If ArchBang is booting from an initrd, you'll have to add a line to the above right after "root =":

 

initrd = /boot/initrd.gz (or whatever designation AB uses for its initrd file)

 

Run lilo as root and VOILA (got it right this time, Roger. ;) )! You'll know it worked when LILO's output in the command line shows the ArchBang.

 

WARNING! If you run lilo in Slack, it will take over (rewrite) the mbr on your drive, so GRUB will no longer be in control of the booting.

 

Anyway, that's how it's done, but like I said... GRUB works fine too, and I see you already got it working. :)

 

Have fun! :w00t:

 

 

 

 

 

 

 

 

 

 

 

Edit: Had to edit this post because the board software still has that bug where it adds all the font, color, size html BS to the code boxes. :(

 

 

 

 

 

 

.

Edited by V.T. Eric Layton
  • Like 2
Link to comment
Share on other sites

securitybreach

I think that is why I liked syslinux when I first tried it. The configuration is similar to lilo and is not over complicated like grub, plus it supports GPT and UEFI. Actually it looks basically the same as lilo with some small differences. Here is my /boot/syslinux/syslinux.cfg for instance:

 

DEFAULT arch
PROMPT 0 # Set to 1 if you always want to display the boot: prompt
TIMEOUT 50
UI menu.c32
MENU TITLE Arch Linux
MENU COLOR border 30;44 #40ffffff #a0000000 std
MENU COLOR title 1;36;44 #9033ccff #a0000000 std
MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all
MENU COLOR unsel 37;44 #50ffffff #a0000000 std
MENU COLOR help 37;40 #c0ffffff #a0000000 std
MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std
MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std
MENU COLOR msg07 37;40 #90ffffff #a0000000 std
MENU COLOR tabmsg 31;40 #30ffffff #00000000 std

LABEL arch
MENU LABEL Arch Linux
LINUX ../vmlinuz-linux
APPEND root=UUID=9a838519-3014-4268-bdca-1b772ed3342b rw
INITRD ../initramfs-linux.img

LABEL arch-LTS
MENU LABEL Arch Linux-LTS
LINUX ../vmlinuz-linux-lts
APPEND root=/dev/sdd1 rw
INITRD ../initramfs-linux-lts.img

LABEL archfallback
MENU LABEL Arch Linux Fallback
LINUX ../vmlinuz-linux
APPEND root=/dev/sdb1 rw
INITRD ../initramfs-linux-fallback.img

#LABEL windows
# MENU LABEL Windows
# COM32 chain.c32
# APPEND hd0 1

LABEL hdt
MENU LABEL HDT (Hardware Detection Tool)
COM32 hdt.c32

LABEL reboot
MENU LABEL Reboot
COM32 reboot.c32

LABEL poweroff
MENU LABEL Poweroff
COM32 poweroff.c32

 

http://ix.io/1L2Q

  • Like 1
Link to comment
Share on other sites

Hey Eric and securitybreach....thanks for all the info about editing lilo and syslinux. SB, would you happen to have a screenshot? I'd like to see how it looks. I know it's only visible for a few seconds, I still like to have it looking sharp. As it is now on my lappy, Grub looks mighty anemic.

Link to comment
Share on other sites

securitybreach

I guess I could take a picture of it but it just simple text entries with no background. Here it is on my netbook:

 

M3zqfUg.jpg

 

Now you can make it look pretty if you desire but since I rarely see it, I didn't bother. For instance, here is the syslinux menu that comes by default on the Archlinux iso:

 

How-to-Replace-GRUB-with-Syslinux-on-Arch-Linux-415394-2.jpg

  • Like 1
Link to comment
Share on other sites

If making your boot loader look cool, you might wanna check out BURG boot loader to trick it out and even theme it? I have no experience with it, other than reading about it and hearing others rave about it. But the option exists!

 

https://www.howtoforge.com/tutorial/how-to-replace-grub-with-burg-boot-loader-ubuntu-16-04/

 

Even though all the links I've found reference Ubuntu, I think it's a coincidence for tutorials and PPAs. I do believe a package is available for any distro. Correct me if I'm wrong, please!

  • Like 1
Link to comment
Share on other sites

Thanks for the screenshot/pic Securitybreach. That looks a lot better then what I had. I discovered that Archbang acually uses Grub, not Grub2. I couldn't figure out why I could never save changes. Well now I know. So I installed the default theme "starfield" and that sorta sucks. :) well, more then sorta. So now I'm about to try one that I had downloaded from slackbuilds.....if all goes well, I should have a slackware theme for grub. Fingers crossed.

 

Hey Hendon James...thanks for the link. Will check it out. This is usually how I end up hosing things....it usually happens when I go nuts tricking things that really don't need to be tricked..... :)

  • Like 1
Link to comment
Share on other sites

Hey Securitybreach....I need to find out if Archbang used whatever came after Grub..... grub legacy??? It isn't Grub2. I saw earlier today a way to determine what I have, but I'm back on Slack and will check later. So to answer your question, it's Grub...... the pic does not do it justice. It is a solid black BG without the glare and reflection of the photographer! :)

Link to comment
Share on other sites

Thanks for the screenshot/pic Securitybreach. That looks a lot better then what I had. I discovered that Archbang acually uses Grub, not Grub2. I couldn't figure out why I could never save changes. Well now I know. So I installed the default theme "starfield" and that sorta sucks. :) well, more then sorta. So now I'm about to try one that I had downloaded from slackbuilds.....if all goes well, I should have a slackware theme for grub. Fingers crossed.

 

Hey Hendon James...thanks for the link. Will check it out. This is usually how I end up hosing things....it usually happens when I go nuts tricking things that really don't need to be tricked..... :)

 

"This is usually how I end up learning things..."

 

There, I fixed it for ya! B)

  • Like 1
Link to comment
Share on other sites

OK...I think I read it wrong... :) This is from the Grub - ArchWiki:

"GRUB is not to be confused with GRUB Legacy--- is the next generation of the GRand Unified Bootloader."

 

So then is Grub different the Grub2 or is Grub2 really Grub? Syslinux is starting to sound better all the time! :)

Edited by wa4chq
  • Like 1
Link to comment
Share on other sites

OK...I think I read it wrong... :) This is from the Grub - ArchWiki:

"GRUB is not to be confused with GRUB Legacy--- is the next generation of the GRand Unified Bootloader."

 

So then is Grub different the Grub2 or is Grub2 really Grub? Syslinux is starting to sound better all the time! :)

 

The original GRUB is now called Grub Legacy.GRUB 2 thats the one that was developed from Grub is now called GRUB. Not to be confused with the old Grub. The brilliant minds that developed Grub and Grub decided this scheme would simplify matters and not confuse folk. Got it :228823:

  • Like 2
Link to comment
Share on other sites

securitybreach

When Grub v2 came out, grub v1 was called grub-legacy. I do not know why they just didn't go with the version naming scheme but perhaps it is because Grub version 2 was a complete overhaul and so much had changed.

  • Like 2
Link to comment
Share on other sites

This may be the last question I have on the topic. Grub is working fine. I ran it from the Archbang partion. But if I were to run it from the Slackware partion running:

# grub-install /dev/sda
# grub-mkconfig -o /boot/grub/grub.cfg

# exit
# reboot

will the original grub be ignored or overwritten and now grub is running from the Slack partion?

Thanks

Edited by wa4chq
Link to comment
Share on other sites

V.T. Eric Layton

You won't be able to run any GRUB commands from Slackware because it doesn't get installed by default. If you type "grub" in the command line, the output will be...

 

WTF?

 

...er, I mean...

 

root@ericsbane07/home/vtel57:# grub
bash: grub: command not found

 

If you didn't install it when you set up your Slackware installation, you'll need to install it to use it. It's in the /extras directory on your Slackware disk. :))

 

The first post in this thread shows how I did it with GRUB legacy a few years back. It's probably the same (or similar) for GRUB2.

 

Have fun!

 

Oh, and each time you run grub (or lilo) they, by design, rewrite your mbr (boot sector); so, say bye-bye to your previous grub or lilo entries. :)

 

This is assuming we're talking about ArchBang and Slack being on the same drive.

Link to comment
Share on other sites

Hi Eric....thanks for the reply. I need to keep notes, I say that all the time! :teehee: I know lilo is there by default, I must have thought I had installed all from the /extra directory.... I see grub in the /boot directory and also in /etc/default and /etc/grub.d. :alien: but when I type "grub" in the command line, I get:

Not here, homey!

I won't mind if it overwrites previous grub entries, just as long as it shows both of them....

This should be my last question grub.... :whistling:

Link to comment
Share on other sites

securitybreach

Wait, why are you trying to install grub twice? You need to only install grub once and when you write it to the mbr of the harddrive, you can boot into whatever distro you want. If you install grub in slackware, it will just overwrite the other grub you installed previously.

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...