Re: 30-minutes with scripts [was Re: Fixing boot problems with grub]
William Ballard wrote: On Sun, Nov 28, 2004 at 07:57:20AM -0600, Hugo Vanwoerkom wrote: For now I just reinstalled the OS. It takes me 30 minutes with scripts. But I looked like a tool having to do that. What does "30 minutes with scripts" mean? I talked about this a year ago. Several people told me with chroot and partimage, I could restore a clean OS image in a couple minutes, which is basically what I do with XP, but I keep a partial mirror of the sid debs I use and point apt to that. My "30 minutes" is: (1) Install Sarge, wipe the disk, use one giant partition for everything. (10 minutes?) (2) Install nothing during Sarge. (3) Mount my apt repository, point apt to it. (4) aptitude install everything in that repository. (20 minutes?) (5) Reboot. (6) Manually run a script which does everything else I need to do to the system. (7) Log in as non-user, run a script which sets up the profile. Probably takes closer to 40 minutes, but I do this process every couple months. I treat home as transient; I treat the whole system as transient. I know you all probably find this process shlocky but it works for me, because apt is so nice. With XP I use partimage. Interesting. I have a similar script. The ultimate reason is to get a "clean install", meaning, you get everything that you need and nothing more. I do it with a script that only presumes an existing Sarge. To finetune it I need the Sarge iso's because otherwise it takes too long to install everything and I am on a dialup line, with no DSL or cable in sight. This is the reason I am about to purchase the 14 Sarge CD's: it is too hard chasing the jigdo-lite templates: too much. Now I have a broken package problem with only 6. And indeed it takes about 40 minutes, may be less, I need to compile the kernel for the Ruby multi-seat Linux patch. Then there are some programs for which there are no Debian packages. This project has an additional benefit: you find out what exactly you are dependent upon in terms of data resources, in case of disk failure, which happened a while ago. H. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Fixing boot problems with grub
On Sun, Nov 28, 2004 at 03:55:27PM -0600, Jim Hall wrote: > I'm trying to understand Grub as well. I finally found out how to make a > boot disk from the FAQ (see link). The Grub project calls this the > "legacy" version (0.9x). > > http://www.gnu.org/software/grub/grub-legacy-faq.en.html > > The relavent Q&A is: > 4. How to create a GRUB boot floppy with the menu interface? Thanks for this pointer. I'll try to follow this and Greg Fokkert's advice about grub-install within a chroot and try to educate myself about how to fix broken grubs. I was pretty slick at lilo. The other thing I'm stuck at in Sarge is Exim4. First thing I do in Sarge is downgrade to Exim3. I'll ask about that in another thread. Sarge has a bit of a learning curve for upgraders. But what in Linux doesn't? -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
30-minutes with scripts [was Re: Fixing boot problems with grub]
On Sun, Nov 28, 2004 at 07:57:20AM -0600, Hugo Vanwoerkom wrote: > >For now I just reinstalled the OS. It takes me 30 minutes with scripts. > >But I looked like a tool having to do that. > > What does "30 minutes with scripts" mean? I talked about this a year ago. Several people told me with chroot and partimage, I could restore a clean OS image in a couple minutes, which is basically what I do with XP, but I keep a partial mirror of the sid debs I use and point apt to that. My "30 minutes" is: (1) Install Sarge, wipe the disk, use one giant partition for everything. (10 minutes?) (2) Install nothing during Sarge. (3) Mount my apt repository, point apt to it. (4) aptitude install everything in that repository. (20 minutes?) (5) Reboot. (6) Manually run a script which does everything else I need to do to the system. (7) Log in as non-user, run a script which sets up the profile. Probably takes closer to 40 minutes, but I do this process every couple months. I treat home as transient; I treat the whole system as transient. I know you all probably find this process shlocky but it works for me, because apt is so nice. With XP I use partimage. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Fixing boot problems with grub
Hugo Vanwoerkom wrote: William Ballard wrote: Whenever Lilo used to mess up with Woody, I'd: 1) Boot from the Woody CD. 2) Mount my existing single Debian partition as / 3) Execute a shell 4) Make sure /vmlinuz and /vmlinuz-old pointed to the right places in /boot. 5) Exit the shell. 6) Run "make system bootable." which would Lilo it up. Today I horked my Sarge Grub install, booted from the Sarge CD, screwed up my paritions when I tried to do (2) (because creating, formatting, and mounting partitions is all connected), verified 4) was correct, couldn't figure out how to do 6), and running "upgrade-grub" from within a chroot didn't work. When I entered "partition my disks," formatting my swap part was already highlighed. I picked my big Debian ReiserFS part and told it not to format it, but to mount it as /, and clicked Finish. D-I told me it was going to make changes to my partition table, even though I didn't tell it to change any partitions. Somehow when it was done my swap part was gone. In Sarge D-I, how can I just mount something as / without changing part tables or formatting anything, and run the "make system bootable" step to recover from botched grub? Or how can I do it from within a chroot. I don't usually keep a second install of Debian around to chroot from, so I'd have to chroot from the Sarge emergency shell or (less desirably) a Knoppix CD. For now I just reinstalled the OS. It takes me 30 minutes with scripts. But I looked like a tool having to do that. What does "30 minutes with scripts" mean? I guess you ended up with a partition that can't be booted by either Lilo or Grub. So I am still a Lilo fan, I modified Lilo's mkrescue to create an iso that is a little more descriptive than "linux" and I keep that around, *always* when using d-i. Because it does grub natively I just let it do grub and use the lilo-rescue to set lilo straight again. My take on grub vs. lilo from a while ago was that if lilo does me good, keep it. H. I'm trying to understand Grub as well. I finally found out how to make a boot disk from the FAQ (see link). The Grub project calls this the "legacy" version (0.9x). http://www.gnu.org/software/grub/grub-legacy-faq.en.html The relavent Q&A is: 4. How to create a GRUB boot floppy with the menu interface? 1. Create a filesystem in your floppy disk (e.g. mke2fs /dev/fd0). 2. Mount the floppy on somewhere, say, /mnt. 3. Copy the GRUB images to the directory /mnt/boot/grub. Only stage1, stage2 and menu.lst are necessary. You may not copy *stage1_5. 4. Unmount the floppy. 5. Run the following commands (note that the executable grub may reside in a different directory in your system, for example, /usr/sbin): /sbin/grub --batch --device-map=/dev/null < I tried the result, and it worked. My take is that this won't "fix" anything that breaks, and there must be a working Grub install on the HD to get the files from. Jim -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Fixing boot problems with grub
William Ballard wrote: Whenever Lilo used to mess up with Woody, I'd: 1) Boot from the Woody CD. 2) Mount my existing single Debian partition as / 3) Execute a shell 4) Make sure /vmlinuz and /vmlinuz-old pointed to the right places in /boot. 5) Exit the shell. 6) Run "make system bootable." which would Lilo it up. Today I horked my Sarge Grub install, booted from the Sarge CD, screwed up my paritions when I tried to do (2) (because creating, formatting, and mounting partitions is all connected), verified 4) was correct, couldn't figure out how to do 6), and running "upgrade-grub" from within a chroot didn't work. When I entered "partition my disks," formatting my swap part was already highlighed. I picked my big Debian ReiserFS part and told it not to format it, but to mount it as /, and clicked Finish. D-I told me it was going to make changes to my partition table, even though I didn't tell it to change any partitions. Somehow when it was done my swap part was gone. In Sarge D-I, how can I just mount something as / without changing part tables or formatting anything, and run the "make system bootable" step to recover from botched grub? Or how can I do it from within a chroot. I don't usually keep a second install of Debian around to chroot from, so I'd have to chroot from the Sarge emergency shell or (less desirably) a Knoppix CD. For now I just reinstalled the OS. It takes me 30 minutes with scripts. But I looked like a tool having to do that. What does "30 minutes with scripts" mean? I guess you ended up with a partition that can't be booted by either Lilo or Grub. So I am still a Lilo fan, I modified Lilo's mkrescue to create an iso that is a little more descriptive than "linux" and I keep that around, *always* when using d-i. Because it does grub natively I just let it do grub and use the lilo-rescue to set lilo straight again. My take on grub vs. lilo from a while ago was that if lilo does me good, keep it. H. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Fixing boot problems with grub
On Sun, 2004-11-28 at 00:24 -0500, William Ballard wrote: > Whenever Lilo used to mess up with Woody, I'd: > > 1) Boot from the Woody CD. > 2) Mount my existing single Debian partition as / > 3) Execute a shell > 4) Make sure /vmlinuz and /vmlinuz-old pointed to the right > places in /boot. > 5) Exit the shell. > 6) Run "make system bootable." which would Lilo it up. > > Today I horked my Sarge Grub install, booted from the Sarge CD, > screwed up my paritions when I tried to do (2) (because creating, > formatting, and mounting partitions is all connected), verified > 4) was correct, couldn't figure out how to do 6), and running > "upgrade-grub" from within a chroot didn't work. > > When I entered "partition my disks," formatting my swap part was > already highlighed. I picked my big Debian ReiserFS part and told > it not to format it, but to mount it as /, and clicked Finish. > D-I told me it was going to make changes to my partition table, > even though I didn't tell it to change any partitions. Somehow > when it was done my swap part was gone. > > In Sarge D-I, how can I just mount something as / without changing > part tables or formatting anything, and run the "make system bootable" > step to recover from botched grub? > > Or how can I do it from within a chroot. I don't usually keep a second > install of Debian around to chroot from, so I'd have to chroot from > the Sarge emergency shell or (less desirably) a Knoppix CD. > > For now I just reinstalled the OS. It takes me 30 minutes with scripts. > But I looked like a tool having to do that. Use grub-install. And given the root FS for the chroot, Where you have "/" and "/boot" properly mounted on "/targ" and "/targ/boot". Without a chroot. /targ/sbin/grub-install --root-directory=/targ /dev/hda Then edit a bare /targ/boot/grub/menu.lst. Reboot. Or do the same with a Knoppix/Gnoppix/liveCD with grub-install on it. -- greg, [EMAIL PROTECTED] The technology that is Stronger, better, faster: Linux signature.asc Description: This is a digitally signed message part
Fixing boot problems with grub
Whenever Lilo used to mess up with Woody, I'd: 1) Boot from the Woody CD. 2) Mount my existing single Debian partition as / 3) Execute a shell 4) Make sure /vmlinuz and /vmlinuz-old pointed to the right places in /boot. 5) Exit the shell. 6) Run "make system bootable." which would Lilo it up. Today I horked my Sarge Grub install, booted from the Sarge CD, screwed up my paritions when I tried to do (2) (because creating, formatting, and mounting partitions is all connected), verified 4) was correct, couldn't figure out how to do 6), and running "upgrade-grub" from within a chroot didn't work. When I entered "partition my disks," formatting my swap part was already highlighed. I picked my big Debian ReiserFS part and told it not to format it, but to mount it as /, and clicked Finish. D-I told me it was going to make changes to my partition table, even though I didn't tell it to change any partitions. Somehow when it was done my swap part was gone. In Sarge D-I, how can I just mount something as / without changing part tables or formatting anything, and run the "make system bootable" step to recover from botched grub? Or how can I do it from within a chroot. I don't usually keep a second install of Debian around to chroot from, so I'd have to chroot from the Sarge emergency shell or (less desirably) a Knoppix CD. For now I just reinstalled the OS. It takes me 30 minutes with scripts. But I looked like a tool having to do that. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]