Jump to content

GRUB (0.97) on Slackware


V.T. Eric Layton

Recommended Posts

V.T. Eric Layton

OK, I'm now running GRUB from Slackware. It controls my MBR and boots all my operating systems on my main machine, with the exception of the soon-to-be plowed under borked Arch.

 

Here's how I did it:

 

GRUB (0.97) on Slackware

 

- Build GRUB from SlackBuild in /Extras or download from SlackyEU (http://repository.sl...ub-legacy/0.97/ --> works on 14 current also)

 

- Make sure to have a boot disk available (just in case)

 

- Remove LILO if it was previously used as the bootloader on the system

> #slackpkg remove lilo

 

- Install GRUB on system

> #installpkg grub-legacy*

 

- Write to the MBR of the main drive on the system

> #grub-install /dev/sd*

 

- Copy previously used menu.lst from another source on the system or create a new menu.lst to boot the operating systems

 

- Reboot --> JOY! :)

 

YAY! I'm planning on using Clonezilla to clone my current Slackware partitions onto the old Arch partitions and use this as secondary OS on this machine. I will re-clone periodically to keep the two relatively synch'd. Of course, since they're on the same drive, a mech failure would be ugly, so I'll still regularly copy my /etc and /home to external media (DVD). This will facilitate ease of reinstall, if ever needed.

Link to post
Share on other sites
V.T. Eric Layton

Umm... nevermind about the cloning of my Slack partitions over my old Arch partitions. Seems you cannot clone to and from the same hdd with Clonezilla. :(

Link to post
Share on other sites
securitybreach

Umm... nevermind about the cloning of my Slack partitions over my old Arch partitions. Seems you cannot clone to and from the same hdd with Clonezilla. :(

 

:thumbsdown:

Link to post
Share on other sites
V.T. Eric Layton

Yeah, but all the dd tutorials I'm seeing are copying from a partition on one drive to a partition on another. I need to copy to a partition on the same drive. I think it can be done, though, because I'll be doing it from SLAX (thumb drive Linux) with the /dev/sda drive unmounted. I'm going to experiment and see what happens. I have to be VERY careful, though. dd doesn't have much mercy on stupid users. :(

Link to post
Share on other sites
V.T. Eric Layton

My first dd worked but with a ton of errors. I realized later that Porteus had mounted all the partitions on boot, so I was dd'ing from mounted partitions. That would explain the errors. The second attempt was almost finished when the power farted at my house. That was the end of that one. I'll try again tomorrow or the next day.

 

Later...

Link to post
Share on other sites

I did this once with cp.

 

cp -pidRv /path/to what/you want copied/* /path/to/where/you want it to go

Edited by mlangdn
  • Like 1
Link to post
Share on other sites
V.T. Eric Layton

I thought about using cp, but I don't think that command is robust enough to accurately mirror an entire partition. I could be wrong, though. I wonder if it would be as fast as rsync is?

Link to post
Share on other sites

I've never used rsync, so I don't know. I do know that I transferred 34GB in about an hour on a 800mhz Thunderbird processor. After that, I added my newly copied partition to fstab, then lilo and rebooted with no problems. The reason I did it was to move to a bigger partition on the drive. I then went back to fstab and lilo to fix it for the new layout, rebooted just fine and then blew away the smaller partition.

  • Like 1
Link to post
Share on other sites
burninbush

Pretty neato!

 

Who needs Clonezilla, huh? ;)

 

I somewhat routinely use tar to write a partition to a file, then extract it in the new location. Using dd generally means copying the whole partition even if only 10% of it is occupied with real files. And of course there is no old-size/new-size issue when using tar.

 

Now, slack is one of the distros that work well when using tar -- but maybe not if you use an initrd, which generally will contain some [?] partition specific information, so if you are going from an sda5 to an sdb5 then the moved distro likely won't run. But I think even that will work if you also move the xx-huge-xx kernel, boot from that till you get a new initrd working.

 

Don't expect the installed grub or lilo to work after doing such a move -- they use absolute sector offsets to find the non-mbr parts of their code, and those files will not be in the same place after a relocation.

Link to post
Share on other sites
V.T. Eric Layton

I rsync'd my Slackware /dev/sda1 and /dev/sda2 to /dev/sda5 and /dev/sda6... worked excellently. I only had to add the proper entry in the original Slack's menu.lst and change the fstab on the copied Slack.

 

In the future, I'll be rsync'ing to a separate drive. I will also use your method, burninbush, of installing GRUB by itself in it's own partition. I'll be putting together a new system sometime later this year. That's the plan for that iteration. :yes:

  • Like 1
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...