LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-16-2012, 06:29 PM   #1
Laertiades
Member
 
Registered: Jul 2012
Location: Pacific Northwest
Distribution: Arch
Posts: 59

Rep: Reputation: Disabled
how to edit a file using a boot cd


I installed slackware 14.0 and tried to switch to the generic kernel by editing lilo.conf. Now I can't boot. When I boot using a cd I can't figure out how to edit a text file. None of the commands I know work: nano, vim, etc. If someone could tell me how to edit lilo.conf while in this condition I would be greatful.
 
Old 11-16-2012, 06:48 PM   #2
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Hi,

boot the CD and be sure to know on which device /dev/sd? you've installed Slackware. Now chroot into your Slackware installation:
Code:
mkdir /mnt/slack
mount /dev/sda? /mnt/slack
mount -t proc none /mnt/slack/proc
mount --rbind /sys /mnt/slack/sys
mount --rbind /dev /mnt/slack/dev
The ? stands for a, b, or what else is correct on your system.
now you're within your Slackware-installation and can edit lilo.conf as if Slackware were running
Code:
vi /etc/lilo.conf
I would recommend to add the huge-kernel as a failsafe option to lilo.conf, here as an example (a part of) my lilo.conf
Code:
# Linux bootable partition config begins
image = /boot/vmlinuz
  initrd = /boot/initrd.gz
  append = "resume=/dev/sda9"
  root = /dev/sda5
  label = Slack64-current
  read-only
###
image = /boot/vmlinuz-huge-3.5.4
  root = /dev/sda5
  label = failsafe
  read-only
# Linux bootable partition config ends
I'm using also the generic kernel (as the default) but when my initrd would not work, I can chose for the failsafe option.

Afterwards run lilo and simply type "exit" to leave the chroot-environment. Then you can reboot the system.

Markus

BTW: Slackware uses elvis as default editor, use vi instead of vim when you've booted the install-CD

Last edited by markush; 11-16-2012 at 06:52 PM.
 
Old 11-16-2012, 08:57 PM   #3
Laertiades
Member
 
Registered: Jul 2012
Location: Pacific Northwest
Distribution: Arch
Posts: 59

Original Poster
Rep: Reputation: Disabled
Thumbs up Thanks

Thank you so much Markus. boots fine now. Great learning experience. I even got the generic kernel working. I definately needed that. Thanks for getting me back on my feet.
 
Old 11-17-2012, 03:01 AM   #4
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
I'm happy to read that you've got it working.

When you have another Slackware-related question, please post it in the Slackware-forum of LQ http://www.linuxquestions.org/questions/slackware-14/ we have a very helpful and knowledgeable community here.

Markus
 
Old 11-18-2012, 03:55 AM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Moved: This thread is more suitable in the Slackware forum and has been moved accordingly to help your thread/question get the exposure it deserves.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to edit the Boot file Ivi Linux - Newbie 2 05-03-2011 06:39 PM
How to edit a gzipped boot.img file without gunzipping it first... NiHao Programming 6 05-25-2009 08:42 PM
Edit ELsmp boot file nablaodel Red Hat 1 09-03-2007 07:45 AM
XORG.CONF file messed up, how do I edit on boot? technofreek Linux - Software 6 03-10-2006 10:25 AM
mepisers which file do i edit to make things start at boot? wellington MEPIS 4 03-04-2006 02:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration