Refracta Development, Scripts, etc.
Post a reply

Re: Refracta Installer not working

Sun Jun 02, 2013 4:13 pm

I don't know if this has anything to do with VastOne's problem, it might.

I have a new sid on a stick. This one is refracta7 unpacked, chrooted, dist-upgraded to sid and the iso rebuilt (manually not snapshot this time) A more full system than before.

It boots and runs live and I'm trying to install it with these options:

grub to partition, change user, uuid in fstab, use existing swap.

I added "set -x" to the script (except the busy rsync bit) to get a full log.

First problem is line 157 :
Code:
grubversion=$(dpkg -l | grep ii | grep -v doc | awk '$2 ~ "grub-[glp]" { print $2}')

but that makes a problem later because we are looking for only "grub-pc" (or whatever other version):

Code:
dpkg -l | grep ii | grep -v doc | awk '$2 ~ "grub-[glp]" { print $2}'
grub-pc
grub-pc-bin

so I changed it to:
Code:
grubversion=$(dpkg -l | grep ii |grep -v bin | grep -v doc | awk '$2 ~ "grub-[glp]" { print $2}')

Next problem (from the log) just before change_username:

Code:
+ [[ -n /dev/sda8 ]]
+ chroot /target update-grub
Generating grub.cfg ...
+ check_exit
+ [[ 1 -ne 0 ]]

then check_exit closed everything down ( but did not umount /target). So I modified check_exit so it would not automatically exit :
Code:
check_exit () {
if [[ $? -ne 0 ]] ; then
   yad --question --title="Error" --window-icon=error --button="Continue":0 --button="Exit now":1 \
   --text="Error detected: $?
\nSee $error_log for details. \n\nThis may not be fatal.. Press \"Continue\" to proceed anyway"

   if [[ $? -ne 0 ]] ; then
   exit 1
   fi

fi
}

This time the installer completed.(the error box appeared at the same place but now I can override it)

Out of time now, more later after I get to boot it up from HD.

Update: booted and running from hd but it wouldn't chainload so grub-install must have failed. Like Dean says, another grub (-pc) finds it on update. It's a rather nice system..

Re: Refracta Installer not working

Sun Jun 02, 2013 4:47 pm

Good work, dzz! Thanks. I'll fix $grubversion. About check_exit - I keep thinking about removing them all. I think I already removed a few, and I'm not sure that they're needed. Not a lot of time right now, but I'll look at it closer.

Re: Refracta Installer not working

Sun Jun 02, 2013 5:12 pm

Grub-install failed but the system booted from another grub. I tried to reinstall grub. This might explain more (I assume it's from apt-listbugs) and what I found might have nothing to do with grub-to-partition. It would very likely cause the installer to fail because of check_exit:

Code:
Get:1 http://ftp.uk.debian.org/debian/ sid/main grub2-common i386 2.00-14 [116 kB]
Fetched 116 kB in 0s (341 kB/s) 
Retrieving bug reports... Done
Parsing Found/Fixed information... Done
critical bugs of grub2-common (-> 2.00-14) <unfixed>
#707653 - grub2-common: After Grub 2.00-14 upgrade, system failed to boot (rescue, old grub 1.99 still in mbr)
critical bugs of grub-pc (-> 2.00-14) <unfixed>
#709808 - [grub-pc] boot failure after updaing to 2.00-14: error: file not found -> rescue console
#708123 - [grub-pc] grub2 (2.00-14) fails to install on RAID arrays (rescue, boot is broken)
#709097 - grub-pc: Boot failure after updating to 2.00-14 - cannot find normal.mod, grub-rescue reports /boot empty
serious bugs of grub-pc (-> 2.00-14) <unfixed>

#707831 - UUID detection code broken, wrongly uses UUID
Summary:
grub2-common(1 bug), grub-pc(4 bugs)
Are you sure you want to install/upgrade the above packages? [Y/n/?/...]

Not a big issue for anyone who knows a little of sid, can get an older version.

But the grub_version detect and check_exit I mentioned will still need sorting for installer.

The good news.. I now have a nice new sid install, thanks to Refracta!

Re: Refracta Installer not working

Mon Jun 03, 2013 2:32 am

About check_exit - I keep thinking about removing them all. I think I already removed a few, and I'm not sure that they're needed

If any are kept a warning with an override option could be used. It might be possible to recover manually (I did). If it will exit umount bind-mounts and /target first.

A "debug" option (full script logging) would be more useful than the errorlog to nail down problems

This thread title really should be changed to "Refracta Installer not working in current sid"

Re: Refracta Installer not working

Mon Jun 03, 2013 4:17 am

Been away for several days and will test tomorrow after 20 hours of much needed sleep...

Grub 2.0 is what I am using, the newest out there from Experimental ... if that makes a difference in all of this

Thanks

Re: Refracta Installer not working

Mon Jun 03, 2013 9:40 pm

A user over at antiX asked about making a snapshot with a non-antiX kernel and this got me testing a bit.

refracta-snapshot and refracta-installer both worked with liquorix kernel on antiX-13.
Great!

So I have added the 4 debs to our repo for users that want to do the same.

Re: Refracta Installer not working

Mon Jun 03, 2013 10:53 pm

I am still getting the same issue after making sure I had the latest yad installed

Re: Refracta Installer not working

Tue Jun 04, 2013 10:11 am

I'm testing the installer in sid right now. In vbox, I installed refracta-7.0, upgraded to jessie then to sid, did not upgrade kernel, but did downgrade grub to the wheezy version before rebooting. made a snapshot, booted the snapshot, and now installing on another partition in the same vm. Expert install, no options chosen. Will try later with same options dzz used above.

I already had trouble with grub-2.00 a couple weeks ago, when I accidentally upgraded to sid. I couldn't even boot into that system with a good grub on another drive. I rescued that by booting a live system, bind mounting stuff and downgrading grub in chroot.

Re: different kernels, different distros
If making a snapshot, make sure that /vmlinz and /initrd.img symlinks exist and point to the correct files. Otherwise, you could specify a different kernel in the config file. Also check the boot menu to make sure it calls the right kernel. (/usr/lib/refractasnapshot/iso/isolinux/live.cfg)
For the installer, I don't think it matters, because update-grub will find the files.

OK, the installer worked on current sid with downgraded grub and no options. I will re-test with options, then if needed, will retest with the evil grub-2.00-14 (or its successor.)

Re: unmounting stuff before exiting
There's a cleanup function that could be added to the check_exit function.

More later...

Re: Refracta Installer not working

Tue Jun 04, 2013 11:39 am

VastOne, running installer with "no bootloader" option should prove grub as the offender or not.

If it completes OK just boot it from another another grub and sort it's own grub manually from there.

fsmithred, have you considered a built-in "full logging" option for future versions? live-boot does that, helped enormously getting stuff working right pre-wheezy.

Re: Refracta Installer not working

Tue Jun 04, 2013 3:03 pm

Tried the install again, this time with options:
change username, change hostname, use uuid, install grub to partition.
Installation completed, but error log shows grub problems - it was looking for a command called 'grub' on line 1157. The fix to $grubversion took care of that on the next attempt. I didn't even try to boot that one.

Second attempt - made the changes to $grubversion and check_exit (). Again, got complaints about putting grub in a partition, but didn't get the "Command not found: grub" error. Took me a few attempts to boot that installation from a grub in the mbr of a different virtual disk.

Tried booting with 'chainloader +1' and it didn't work. Tried booting with 'configfile' and I'm not sure if it worked or not, because both installs are using the default debian grub menu. It booted when I specified the root, kernel and initrd (used the grub in the mbr of the first disk.) Made some changes to the grub menu, ran update-grub and rebooted. Then I could use the configfile command and see that it gave me the correct grub menu, but the boot hangs at "Loading initial ramdisk..."

To be continued...
Post a reply