Multi-Boot Application - Progress

Contribute code to SolydXK and make it even better.
Deleted User 2764

Re: Multi-Boot Application - Progress

Postby Deleted User 2764 » 08 Aug 2014 02:25

I am a bit familiar with Perl and PHP OO. I hope Python is at least similar? Never got into the OO stuff in Python but hopefully in the near future I'll find out.

User avatar
Arjen Balfoort
Site Admin
Posts: 9286
Joined: 26 Jan 2013 19:36
Location: Netherlands
Contact:

Re: Multi-Boot Application - Progress

Postby Arjen Balfoort » 08 Aug 2014 07:05

Looking very good, Scott, and you're already inheriting classes?!

In my early days I've been a Microsoft developer, and Python reminds me a bit of Visual Basic 6 if you're talking OO. You can do it, but you can see it was not made with that in mind. It's not always as straightforward as you might hope. I've developed in .Net when it first came out, and I found that the implementation of, for example threading, was very well thought out, and easy to implement. Threading in Python is, to say the least, not always easy, especially when you need to use multiple threads, and each thread needs to return information to the parent.


SolydXK needs you!
Development | Testing | Translations

Deleted User 2764

Re: Multi-Boot Application - Progress

Postby Deleted User 2764 » 08 Aug 2014 16:43

I looked at one of your posts that mentioned the embedded help and have a suggestion: Maybe you could put the help in a fixed-size window but scrolling text? This would make it easier in the future for you if you need to add help text and it becomes too big to fit in the window.

Also not everyone has the same size screen so some screens (VMs, etc.) it might not fit?

User avatar
ScottQuier
Posts: 1781
Joined: 18 Jul 2013 15:55
Location: Newport News, VA

Re: Multi-Boot Application - Progress

Postby ScottQuier » 08 Aug 2014 19:35

Good Idea !!

One more thing to play with - scrolling windows!

The good news is that I haven't started re-building that window yet. :mrgreen:
Scott
Quoting zerozero, "The usage of PPA's in debian-based
systems is risky at best and entails serious compatibility
problems; usually it's the best way to destroy an install"

User avatar
ScottQuier
Posts: 1781
Joined: 18 Jul 2013 15:55
Location: Newport News, VA

Re: Multi-Boot Application - Progress

Postby ScottQuier » 24 Aug 2014 20:18

Waiting on help from Schoelje as to how to get it loaded back to the git hub .... but in the meantime, here are some info:

I've got it working such that 90% of the operations can be done without resorting to running it as root! :mrgreen:

There's only one function that needs root - completely cleaning the target USB device which involves unmounting the device, running dd against it, creating a new partition table, creating a new data partition, formatting the partition, and installing grub. Yeah, needs root for that stuff.

Here are a couple of pretty pictures:
MainWindow.jpg
The main window. Note that the "Clean USB" RadioButton is ghosted - not running this as root here
MainWindow.jpg (39.25 KiB) Viewed 3552 times
HelpWindow.jpg
RavenLX has a good point - make the Help window sizeable and include the data scrollable - don't know the size of the user's monitor. This shows bigger here than it is in real life!
HelpWindow.jpg (54.09 KiB) Viewed 3552 times
On the USB device, the various iso files don't have the version number (i.e., 201407) included, so the filename is of the form solydk64.iso. This offers the opportunity for a user to over-write a currently included iso with another, newer file. But a warning must be offered, just in case. I may have to re-visit this one and include a bit more detail.
Warning.jpg
You can refresh a file, but there's a warning displayed ... just in case
Warning.jpg (11.92 KiB) Viewed 3552 times
Scott
Quoting zerozero, "The usage of PPA's in debian-based
systems is risky at best and entails serious compatibility
problems; usually it's the best way to destroy an install"

Deleted User 2764

Re: Multi-Boot Application - Progress

Postby Deleted User 2764 » 24 Aug 2014 20:26

You're doing an awesome job on this! It all looks fantastic! I like the way you got the clean option greyed out. How would someone though do these operations as root? Would it involve restarting the program as root? How would people know to do this? I'm thinking instead of greying that out, have it so if someone clicks on that radio button, a dialog pops up to ask for root password and an OK to do it as root and cancel (which would ultimately clear that radio button and choose either the top radio button or the last-picked radio button).

The help window is really cool too. :)

User avatar
ScottQuier
Posts: 1781
Joined: 18 Jul 2013 15:55
Location: Newport News, VA

Re: Multi-Boot Application - Progress

Postby ScottQuier » 24 Aug 2014 20:43

RavenLX wrote:You're doing an awesome job on this! It all looks fantastic! I like the way you got the clean option greyed out. How would someone though do these operations as root? Would it involve restarting the program as root?
Yes, for example, gksudo ....
Not the best solution, but it's the best I could do at this time.
RavenLX wrote: How would people know to do this?
By reading the "Help", that' what it's there for! :)
RavenLX wrote: I'm thinking instead of greying that out, have it so if someone clicks on that radio button, a dialog pops up to ask for root password and an OK to do it as root and cancel (which would ultimately clear that radio button and choose either the top radio button or the last-picked radio button).
This is a really good idea .... for the next version
RavenLX wrote: The help window is really cool too. :)
Thanks
Scott
Quoting zerozero, "The usage of PPA's in debian-based
systems is risky at best and entails serious compatibility
problems; usually it's the best way to destroy an install"

User avatar
ScottQuier
Posts: 1781
Joined: 18 Jul 2013 15:55
Location: Newport News, VA

Re: Multi-Boot Application - Progress

Postby ScottQuier » 24 Aug 2014 21:04

RavenLX wrote: How would people know to do this?
You, sometimes I just need someone kick me where it'll do the most good! How's this for a short-term solution:
ToolTip.jpg
Note the tooltip in the block box and the fact that the RadioButton is still ghosted.
ToolTip.jpg (37.05 KiB) Viewed 3551 times
Scott
Quoting zerozero, "The usage of PPA's in debian-based
systems is risky at best and entails serious compatibility
problems; usually it's the best way to destroy an install"

Deleted User 2764

Re: Multi-Boot Application - Progress

Postby Deleted User 2764 » 24 Aug 2014 21:12

That's perfect! I didn't think of that! :)

Refugee
Posts: 47
Joined: 17 Apr 2014 00:32

Re: Multi-Boot Application - Progress

Postby Refugee » 25 Aug 2014 02:34

@Scott

I'm looking forward to trying this out.

What bootloader are you using? Any plans to handle non-linux .isos?

You might consider a 'bootloader repair' option. As someone who uses multi-boot flash drives on a daily basis, I run into a broken bootloader (syslinux, grub4dos) far too often. It's generally not hard to fix but an automated single-click option is mighty nice to have. You'll save yourself some support time too.

Drop me a line when you're ready for beta testing.

User avatar
ScottQuier
Posts: 1781
Joined: 18 Jul 2013 15:55
Location: Newport News, VA

Re: Multi-Boot Application - Progress

Postby ScottQuier » 25 Aug 2014 11:22

@Refugee ...

The application functional requirements I was given addressed only SolydXK iso files, nor did they include anything about fixing the boot loader of an installed system.

Required functionality only addressed the following:
  • Create a bootable USB device
  • Use grub to allow user to boot into any one SolydXK iso image on USB device
  • Download from the SolydXK site and save to the USB device any one of the iso images available there. Rinse, repeat as required.
  • Copy an already downloaded SolydXK iso image to the USB device. Rinse and repeat as required.
  • Delete from the USB device any already "installed" iso image.
  • After each download/copy/delete operation, update the grub menu to include only those iso images "installed" on the USB device.
Thanks for the offer help with the testing. Very much appreciated. I will be announcing here the upload of the project to github in the next day or two. Also included in that announcement will be brief instructions on how to get the application running and (now that I think about it) something approximating a test plan.
Scott
Quoting zerozero, "The usage of PPA's in debian-based
systems is risky at best and entails serious compatibility
problems; usually it's the best way to destroy an install"

Deleted User 2764

Re: Multi-Boot Application - Progress

Postby Deleted User 2764 » 25 Aug 2014 14:08

@Scott: Maybe that fix bootloader could be on your list for future versions? Sounds useful. But I think in the mean time people can just back up the data on the stick and then use gparted to wipe the stick and start over. At least it is fixable. Maybe not as conveniently so but fixable nonetheless. At least that's one way to do it. There's probably others.

User avatar
ScottQuier
Posts: 1781
Joined: 18 Jul 2013 15:55
Location: Newport News, VA

Re: Multi-Boot Application - Progress

Postby ScottQuier » 25 Aug 2014 16:38

Actually, if the target is a USB device that's already been through the "Clean USB" function, fixing the boot loader is a piece of cake. So, yes, something to think about in the next version; let's get this thing through testing and released before we do any more feature updates.

Fixing the boot loader on the systems /dev/sda - not something I want to mess with as there's way too much chance of totally borking the user's install.
Scott
Quoting zerozero, "The usage of PPA's in debian-based
systems is risky at best and entails serious compatibility
problems; usually it's the best way to destroy an install"

User avatar
fleabus
Posts: 1227
Joined: 16 Sep 2013 04:24
Location: Winchester, VA USA

Re: Multi-Boot Application - Progress

Postby fleabus » 25 Aug 2014 16:59

ScottQuier wrote:...Fixing the boot loader on the systems /dev/sda...
Perhaps rather out of scope for a multiboot USB creator app...?
I could see choosing/maintaining the boot loader for the USB?

...Just the musings and maunderings of this ancient and uncivilized cave dweller.... :mrgreen:

Deleted User 2764

Re: Multi-Boot Application - Progress

Postby Deleted User 2764 » 25 Aug 2014 17:47

Well, am I right in guessing Scott has frozen this version of the application? Congrats Scott, on the first iteration! Looking forward to the release. I can't promise but I'll see if I have time to test it.

And I'm sure you will be quite busy afterwards with that list of future features. :)

User avatar
ScottQuier
Posts: 1781
Joined: 18 Jul 2013 15:55
Location: Newport News, VA

Re: Multi-Boot Application - Progress

Postby ScottQuier » 25 Aug 2014 18:13

RavenLX wrote:Well, am I right in guessing Scott has frozen this version of the application? Congrats Scott, on the first iteration! Looking forward to the release. I can't promise but I'll see if I have time to test it.

And I'm sure you will be quite busy afterwards with that list of future features. :)
Feature list was frozen some time ago. :)

More testers will make it better.

I'll be updating this on a periodic basis.

Another thing I want to look at is the UM - while I was looking though it for clues to solve some problems I was having I discovered a couple of things that didn't look quite right. Analysis may show that I didn't see what I thought, but I also might be able to improve it in some small way. One lives in eternal hope!

Something else I want to do - python oriented tutorials:
  • Threading - create, manage, terminate, etc
  • subprocess - run cli commands and manage/use either the returned data or the return code
  • Might also work on a glade tutorial or two. My GUI is rather simple, but working in the UM (the GUI of which is quite complex) will provide me with all sorts of information from which I can create the glade tutorial.
Scott
Quoting zerozero, "The usage of PPA's in debian-based
systems is risky at best and entails serious compatibility
problems; usually it's the best way to destroy an install"

Deleted User 2764

Re: Multi-Boot Application - Progress

Postby Deleted User 2764 » 25 Aug 2014 18:56

I was going to make a python/glade tutorial but I been so busy. So I think I rather learn from your tutorials. :) If it's ok with you I could link to your tutorials from my site? I think that would be awesome to have especially with the newer Python3 and newest Glade. There aren't any up-to-date Python/Glade tutorials out there.

Refugee
Posts: 47
Joined: 17 Apr 2014 00:32

Re: Multi-Boot Application - Progress

Postby Refugee » 25 Aug 2014 19:17

fleabus wrote: I could see choosing/maintaining the boot loader for the USB? ...
This is what I was referring to (Thanks Fleabus). My apologies, I missed the context of this exercise as a Solyd-only endeavor. But my original point (assuming you are formatting the USB with fat32), based on fairly broad experience with more general multi-boot loaders, still stands- Find a way to protect or repair the USB bootloader because they can and will break (especially when inserted on a machine with pre-existing Windows-NTFS installs which can write bits to the USB of its own accord. This is a known issue, for example, when performing forensics on Windows machines). Doing so will save you headaches and support time down the road.

But beyond that, surely you see the potential for the much broader application of this tool once you've achieved your stated goal?

User avatar
ScottQuier
Posts: 1781
Joined: 18 Jul 2013 15:55
Location: Newport News, VA

Re: Multi-Boot Application - Progress

Postby ScottQuier » 25 Aug 2014 20:38

@Refugee

I can see the potential for the problem you describe. And, as I don't think it's too much of a issue to roll that in, it might be a good idea to do it sooner rather than later.

Thanks!
Scott
Quoting zerozero, "The usage of PPA's in debian-based
systems is risky at best and entails serious compatibility
problems; usually it's the best way to destroy an install"

User avatar
ScottQuier
Posts: 1781
Joined: 18 Jul 2013 15:55
Location: Newport News, VA

Re: Multi-Boot Application - Progress

Postby ScottQuier » 25 Aug 2014 20:44

All --

For those who want to play,
  • make sure you have python3 installed (should be there by default)
  • Clone the project at: https://github.com/SolydXK/multi-usb-creator
  • cd to multi-usb-creator/usr/lib/solydxk/multi-usb-creator and spin up ./MultiBootISOCreator.py
  • It would probably be a good idea to click on the "Help" button as your first step :)
Oh, and BTW ... I'll be pushing updates on a daily basis for the next week or so as I (and, hopefully, other) find things that need correcting.
Scott
Quoting zerozero, "The usage of PPA's in debian-based
systems is risky at best and entails serious compatibility
problems; usually it's the best way to destroy an install"


Return to “Code”

Who is online

Users browsing this forum: No registered users and 1 guest