LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-28-2010, 03:52 AM   #1
svar
Member
 
Registered: Jul 2003
Posts: 362

Rep: Reputation: 30
Does making a partition bootable erase any data?


Due to a mixup when installing another Linux on a different partition on the same disk(that is I had /dev/sdb1 ->Slack 13 and added /dev/sdb3->Ubuntu), making /dev/sdb3 bootable, lilo would not work. I think dev/sdb1 was bootable before and the reason lilo does not work is it is not bootable now. So if I use the Slack installation DVD and make /dev/sdb1 bootable, does it erase any data, as it warns?
For the record, here is lilo.conf

# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/sdb1
label = Slack13
read-only # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
image = /boot/vmlinuz-2.6.31-14-generic
root = /dev/sdb3
label =Karmic9.10
initrd=/boot/initrd.img-2.6.31-14-generic


I should add I can boot everything with grub of yet a 3rd linux distro I have, but I am just curious...
 
Old 02-28-2010, 03:59 AM   #2
samac
Senior Member
 
Registered: Mar 2004
Location: Kirkwall, Orkney
Distribution: Linux Mint 20.3 - Cinnamon
Posts: 1,425

Rep: Reputation: 139Reputation: 139
Should be OK to use fdisk or cfdisk to make sdb1 bootable, but before you do, did you re-run lilo? Boot with the Slackware cd and then re-run lilo and see if that fixes the problem.

samac
 
Old 02-28-2010, 09:10 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
You do not need the set the "bootable" flag---Linux does not use it. Regardless, it is only a flag in the partition table--it does not affect your data.
 
Old 03-01-2010, 12:44 AM   #4
svar
Member
 
Registered: Jul 2003
Posts: 362

Original Poster
Rep: Reputation: 30
Yes, I di dre-run lilo. The problem with booting with the Slack DVD:
...login as root
mkdir /mnt
mount /dev/sdb1 /mnt/root
cd /mnt/root
Now one needs to run /mnt/root/sbin/lilo
which looks for lilo.conf in /etc while it is in /mnt/root/etc
Furthermore, images in /boot should read images in /mnt/root/boot
So
cp /mnt/root/etc/lilo.conf /etc/lilo.conf #/etc is in memory
but cp /mnt/root/boot/... stuff does not work(too big for memory?)
So I need to change lilo.conf to look for vmlinuz in /mnt/root/boot/...
Right?
 
Old 03-01-2010, 02:09 AM   #5
samac
Senior Member
 
Registered: Mar 2004
Location: Kirkwall, Orkney
Distribution: Linux Mint 20.3 - Cinnamon
Posts: 1,425

Rep: Reputation: 139Reputation: 139
When you boot via the DVD you do not need to mount anything the DVD boots you into your system.
Quote:
Welcome to Slackware64 version 13.013 (Linux kernel 2.6.32.7)!

If you need to pass extra parameters to the kernel, enter them at the prompt
below after the name of the kernel to boot (huge.s etc).

In a pinch, you can boot your system from here with a command like:

boot: huge.s root=/dev/hda1 rdinit= ro

In the example above, /dev/hda1 is the / Linux partition.

This prompt is just for entering extra parameters. If you don't need to enter
any parameters, hit ENTER to boot the default kernel "huge.s" or press [F2]
for a listing of more kernel choices.
So you need to use
Quote:
huge.s root=/dev/sdb1 rdinit= ro
samac
 
Old 03-01-2010, 02:09 AM   #6
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750
Quote:
So I need to change lilo.conf to look for vmlinuz in /mnt/root/boot/...
Right?
NO - Use the -r option to lilo i.e.
Boot from the Slackware 13 install disk and continue until after selection of a keyboard and you have a root login. Then:
'mkdir /mnt/tmp' - Note: you had mkdir /mnt, but that directory already exists. Create a new subdirectory.
'mount /dev/sdb1 /mnt/tmp'
'/mnt/tmp/lilo -r /mnt/tmp'

[edit] samac's way is better [/edit]

Last edited by allend; 03-01-2010 at 02:15 AM.
 
Old 03-01-2010, 03:02 AM   #7
trryhend
Member
 
Registered: Oct 2007
Posts: 42

Rep: Reputation: 15
samac is correct. Your problem is that you did not chroot to the system and therefore lilo will not work properly. Boot as samac suggested and try again, (you'll see the instructions on the screen.)
 
  


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
Making a USB stick bootable from a bootable cdrom cwwilson721 Slackware 2 10-23-2009 09:18 PM
Help: Making Cloned Partition Bootable ladyrico Linux - Newbie 5 02-23-2009 11:57 PM
Help: Making Cloned Partition Bootable ladyrico Linux - Newbie 1 02-21-2009 10:26 PM
Making new partition and keeping existing data SDmac Slackware - Installation 3 05-20-2005 07:14 AM
making a partition bootable wenberg Linux - General 1 01-22-2004 09:57 AM

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

All times are GMT -5. The time now is 05:25 PM.

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