Recommended Posts

But if the drive is blank ^ then it won't detect an EFI table because the disk won't have one :/.

hmm, good point. I'm not too sure on that one. I found a small tidbit here:

Access to UEFI Runtime services is provided by "efivars" kernel module which is enabled through the CONFIG_EFI_VAR=m kernel config option. This module once loaded exposes the variables under the directory /sys/firmware/efi/vars. One way to check whether the system has booted in UEFI boot mode is to load the "efivars" kernel module and check for the existence of /sys/firmware/efi/vars directory with contents similar to :

So in theory, one could just do:

modprobe efivars && ls /sys/firmware/efi/vars

I've rewritten most of the code I was using to play around with reading partition tables so that it's more structured. The figures seem to be coming out right now, on my system at least. It's still somewhat buggy and I haven't tested it thoroughly, but if you want to play around with it, I've attached the code.

post-429662-0-72300800-1350242493_thumb.

disks.zip

The program needs to be run as a super user ( sudo ) if you wish to see the 'used' statistic of unmounted file systems. It temporarily mounts them if they aren't already mounted and registered in /etc/mtab.

Some outstanding problems:

1. The gtk widget I created for visualising the disk layout isn't perfect. Specifically, I need to fix the way it allocates space for each volume. Currently it runs out of space quickly. Perhaps I need to loop through the volumes and adjust the spacing before I do the actual rendering, but I'll try and fix that later.

2. I had a real hassle trying to programmatically mount the block device file systems so I could get statistics via statvfs (). Specifically, the mount () function requires file system specific esoteric arguments that I just couldn't get to work ( as of yet ), so for now I'm just calling out to the shell's mount command. It's not ideal, but it works.

Again, there are bugs, and the code is messy in parts. To compile you'll need your distro's gtk3 dev package. On arch, it's just extra/gtk3. On Ubuntu/Mint/others it's probably libgtk-3-dev or something like similar. Obviously, you'll need gcc/pkg-config installed as normal.

When I have more time, I'll fix the outstanding bugs.

That looks beautiful! Nice work! :D

Only problem with it is that it needs GTK3, and PHP-GTK is GTK2 only :(

EDIT: Ah you've done it as C... Guess we could run that seperately somehow and output a command list the installer could read?

Edited by n_K

That looks beautiful! Nice work! :D

Only problem with it is that it needs GTK3, and PHP-GTK is GTK2 only :(

Thanks. It's a start at least.

As far as gtk goes, it's easy enough to convert it to gtk2. The only major changes needed to convert it revolve around:

PRIVATE void
disk_layout_class_init ( DiskLayoutClass *in )
{
	GtkWidgetClass *base;

	base = GTK_WIDGET_CLASS ( in );
	base->draw  = disk_layout_draw;

	g_type_class_add_private ( in, sizeof ( disk_info ) );
}

Just change the 'base->draw' override to 'base->expose_event'. There are a few other minor changes like retrieving the widget's allocation, and container v/h boxes.

EDIT: Ah you've done it as C... Guess we could run that seperately somehow and output a command list the installer could read?

The code is quite modular. You could stick some of it ( block_dev.c, partition.c, fs.c ) into a shared library and call it from php perhaps. Or as you say, run it separately. The code I have here already prints the tables to stdout, so I suppose you could redirect that or parse it in some way.

The widget could easily be implemented in php I would think.

Edit: The same information can probably be obtained from /proc/partitions and /sys/block if you prefer the directory iteration / parsing static text files route. I opted for reading the partition tables directly from the block devices just to see if I could do it ;). I get the list of block devices from /sys/block myself.

I've fixed the widget problem (mostly). As I thought, it was as simple as reserving space for each volume:

post-429662-0-84184100-1350303874.png

PRIVATE int
disk_layout_calc_reserved ( PartitionTable * t )
{
	Partition *p;
	int	   res = 0;

	p = NULL;
	while ( NULL != ( p = LIST_ITER ( t, p ) ) )
		res += VOLUME_LINE_WIDTH + VOLUME_SPACING;

	res += VOLUME_SPACING;
	return res;	
} 
...
PRIVATE gboolean
disk_layout_draw ( GtkWidget *layout, cairo_t *cr )
...
geometry.width -= disk_layout_calc_reserved ( info->table ); 

There might be an easier or better way of doing it without pre-calculating space to reserve, but I haven't thought of one yet, so this will do for now.

  • Like 3
  • 2 weeks later...
  • 2 weeks later...

OK so I just quickly added the PHP-GD code to the installer code (after compiling php-gd twice!) and made it change the first image to see if it'd work. It did! So then I got it working via a GDKPixBuf using a GD image instead of having to save the file at all, so it's pretty nifty!

look in to the https://gitorious.org/chakra/tribe it the Chakra installer witch is a arch based distro witch you might be able to make use of

b

im just saying use the installer code and use gnome if you want

No, it's been discussed and it'd be pointless, might as well just use their distro if that's all we were doing. And having GTK3 and QT on an installer ISO would make it massive for no real reason and confuse people.

Installer's still at the same progress as it was, don't really have the time to work on it much now plus the update has borked this arch OS so I can't startx to run things on the VM remotely for testing so until arch bucks up and I get more free time it's completely stale.

Yeah you're missing the point, why just stick that on arch, make an ISO and distribute it? There's nothing to be learnt by doing that, anyone can do it. Making a GUI etc. is all experience and gets you up to scratch with the base of the OS.

  • 9 months later...
This topic is now closed to further replies.
  • Posts

    • Waymo recalls self-driving software after cars enter closed freeway work zones by Paul Hill Waymo, the self-driving car maker owned by Alphabet – the parent company of Google –, has recalled some of its fifth-generation Automated Driving Systems (ADS). It did so after some of its cars drove through closed construction zones. According to the National Highway Traffic Safety Administration (NHTSA), the affected vehicles were capable of driving through a closed freeway construction zone and continuing to drive at speed. The listing on the NHTSA website says that Waymo is currently developing a solution to fix this issue, but in the meantime, freeway driving is being restricted. Waymo will update its ADS software so that vehicles can detect when they can avoid entering construction zones. According to the Safety Recall Report, on April 20, 2026, Waymo’s Field Safety Committee began meetings reviewing an event from April 11, 2026, and five events from April 19, 2026, where Waymo’s autonomous vehicles didn’t recognize and drove past ramp closure signs into the pre-planned freeway construction zones. This took place in Phoenix, Arizona. Separately, on May 18, 2026, seven Waymo vehicles entered freeway lanes with active construction in the San Francisco Bay Area by driving between cones that were placed to show the lane was closed. On the back of both of these events, Waymo restricted freeway driving until it could address the issue. In June, Waymo’s Safety Board reviewed the issue and additional information related to ADS performances around construction zones; then, as a result, it decided to conduct a recall. This development is not good for Waymo as it adds to a growing list of technical hiccups its cars have experienced. Ultimately, it will lead to more scrutiny from lawmakers around the world who will be more cautious about letting autonomous vehicles on their roads without tighter regulation. For readers in areas where Waymo operates, does this news make you more wary about stepping into one of these vehicles?
    • I'm still on Windows 10 22H2 because I didn't want to deal with all the issues in Windows 11, so I waited almost a week before installing the latest Patch Tuesday update (KB5094127), I went ahead and did it, and it was a huge mistake—ever since then, my File Explorer has seen a performance drop of about 30% when transferring large files... Once again, Microsoft has outdone itself! This update cannot be uninstalled, either through the Control Panel (via Settings) or by accessing Advanced Startup Options. The only possible alternative would be to use system restore points, but I’d have to reinstall all app and driver updates (and there’s no guarantee it would work). Or there’s the “nuclear option” of a in-place repair without losing files or apps, but even then, all my customizations would be lost! Microsoft just can’t help but mess everything up! Way to go, Microsoft! But I still don’t want your c****y Windows 11!
    • Microsoft: Windows 11 could finally solve a major issue across AMD, Nvidia, and Intel GPUs by Sayan Sen While Microsoft has been trying to improve it, Windows 11 is definitely not flawless, as even today some issues are taking a year to publicly acknowledge. However, one area of trouble that may finally see much better results soon is graphics driver crashes. Work on graphics driver timeouts, also called Timeout and Detection Recovery (TDR), is not new as the latest WDDM 3.2 also has specific improvements regarding it. Windows Display Driver Model (WDDM) version 3.2 is supported on Windows 11 24H2 and 25H2. However, with the upcoming version 26H2, TDR crash diagnosis could go to the next level as Microsoft is introducing a new DirectX 12 API feature called "DirectX Dump Files". Similar to how system memory dump files work when a system crashes or freezes or encounters any such major issue, DirectX Dump Files (DDF) will essentially record a snapshot of the GPU execution right at the moment a graphics-related crash or hang or freeze occurs, so that developers can better understand and diagnoze these TDR and timeout detection errors. The dump will be available as a .dxdmp file for analysis and it will be a comprehensive dump file generated with detailed insights about the hardware, drivers, Windows, as well as the affected application. This should be another welcome change in this department. Earlier at GDC 2026, when the technology was first debuted, Microsoft had shared more details regarding it. The company had explained how DDF is designed to gather data from every layer of the graphics stack into a single file, eliminating the need for developers to manually correlate logs from multiple tools. As mentioned above, the dump can contain a lot of useful details like GPU hardware state information such as register values, shader program counters, page fault virtual addresses, shader memory data, and command buffers. Alongside that, it also captures DirectX runtime and kernel information, including D3D objects, pipeline state objects, device error data, adapter details, and CPU call stacks. Microsoft says the feature has been built around two primary use cases: retail device removals and local device removals. The former allows developers to collect crash information from end users' systems in the field, while the latter helps QA teams and developers investigate issues on test machines. Developers will also be able to include up to 2 MB of custom application data through new D3D12 APIs, providing additional context for troubleshooting. In addition, Microsoft is introducing three dump collection modes ranging from zero-overhead capture, which has no runtime performance impact on supported hardware, to higher-detail modes that collect more vendor-specific debugging data. On compatible Tier 2 hardware, zero-overhead dumps will be enabled by default, meaning developers may begin receiving useful crash diagnostics without making any code changes. The table below explains the three tiers: Tier Description NO_OVERHEAD Enables crash capture with no runtime cost and is suitable for broad deployment MEDIUM_OVERHEAD Provides a balance, capturing additional diagnostic data with moderate impact HIGH_OVERHEAD Collects the most detailed GPU and driver state available, enabling deeper investigation at the cost of higher runtime overhead In terms of availability, the company expects broader release to be around the fall of 2026, which should be right around the time when Windows 11 version 26H2 lands. Right now, DirectX Dump Files are available as a preview and currently, only AMD has the compatible AgilitySDK Developer Preview driver version 26.10.07.02. You can find the official announcement post here on Microsoft's website.
    • And with SO much better perf than the laggy mess that is Files.
  • Recent Achievements

    • First Post
      BizSAR earned a badge
      First Post
    • Week One Done
      Jordan Smith earned a badge
      Week One Done
    • Reacting Well
      BizSAR earned a badge
      Reacting Well
    • First Post
      AndreaB earned a badge
      First Post
    • Week One Done
      Huge Trailer earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      598
    2. 2
      +Edouard
      190
    3. 3
      PsYcHoKiLLa
      80
    4. 4
      Michael Scrip
      76
    5. 5
      Steven P.
      69
  • Tell a friend

    Love Neowin? Tell a friend!