Search logs:

channel logs for 2004 - 2010 are archived at http://tunes.org/~nef/logs/old/ ·· can't be searched

#osdev2 = #osdev @ Libera from 23may2021 to present

#osdev @ OPN/FreeNode from 3apr2001 to 23may2021

all other channels are on OPN/FreeNode from 2004 to present


http://bespin.org/~qz/search/?view=1&c=osdev&y=18&m=11&d=20

Tuesday, 20 November 2018

04:00:46 <zenix_2k2> sorry for re-asking this but i had to leave so, when talking about MBR, it can only hold up to maximum 4 primary partitions right ?
04:00:59 <Mutabah> yes.
04:01:46 <Mutabah> Which is why they're called "primary" partitions (to distinguish from the "extended" partitions, which are iirc a linked list)
04:03:09 <zenix_2k2> wait so er, i CAN'T have 4 different operating systems in my machine if i use MBR ?
04:05:25 <bcos> If each primary partition contains 4 extended partitions, then you can have 16 operating systems (one in each extended partition)
04:05:47 <bcos> ..until someone creates "extended extended partitions" and decides to install 64 operating systems
04:16:16 <zenix_2k2> Hm but... isn't an OS's filesystem usually installed on a primary partition than an extended one ?
04:17:56 <bcos> Depends on whose definition of "usually" :-)
04:18:18 <vdamewood> Installing the OS on a primary partition is for people who only have one OS.
04:19:06 <geist> there are also some 'rules' about how many extended partition chains there can be
04:19:23 <geist> iirc, you can have up to 4 primary partitions, *or* one primary plus one extended partition chain
04:19:34 <geist> ie, not 3 primaries and an extended, and not a bunch of extendeds
04:19:51 <geist> but then that's based on what DOS supported. there's no hard standard
04:20:09 <vdamewood> I've had three primaries and multiple extended partitions.
04:20:15 <zenix_2k2> vdamewood: yea but i think MBR can stores like 4 primary ones, so 4 OSes people also ?
04:20:27 <zenix_2k2> or 1-4
04:21:05 <vdamewood> You can have four primary partitions. If you have any extended partitions, the chain consumes a primary partition.
04:21:33 <vdamewood> (as such, if you have any extended partitions, they also have to be contiguous with each other)
04:21:39 <geist> yah
04:21:59 <geist> hence why i think what you're 'supposed' to do is have a single primary and then give the rest of the drive to extended
04:22:14 <geist> based on what DOS did when they added the extended feature. it's all a terrible hack upon hack
04:22:29 <vdamewood> geist: Like JavaScript?
04:22:31 <geist> but of course most oses will support any combination of them
04:23:13 <vdamewood> They should have just made it to that the partition table could have 16 or 32 partitions from the beginning.
04:23:24 <geist> right, but it was a cheezy hack
04:23:30 <zenix_2k2> ok this is a lot of info, does the wiki page document them all ?
04:23:34 <vdamewood> Though, I think I'd be fine with just 8.
04:23:43 <zenix_2k2> i mean i am not even sure which keyword to search now
04:23:43 <geist> not even sure original dos had partitions. they added it later, in the gap that was some space in their boot sector, hence the odd offset and limited size
04:23:46 <geist> then it grew from there
04:24:20 <vdamewood> geist: Makes sense, the original IBM PC didn't even have a hard drive.
04:24:37 <geist> then extended partitions are it's own little cheezy hell: it's a large primary partition which has a MBR partition table at the start, that has a single entry, pplus a pointer to the next partition table which is offset
04:24:41 <geist> and it continues from there
04:25:23 <geist> hence why you can have some arbitrarily large number of extended partitions (though i'm sure DOS has some fixed limit somewhere)
04:25:48 <vdamewood> 26 :P
04:26:01 <vdamewood> Well, 24, because of A and B.
04:26:14 <geist> i'm sort of tempted to find out in a VM
04:26:24 <geist> might do that a bit later, after a drink or two
04:26:36 <vdamewood> I bet the limit is 24.
04:26:39 <geist> i'm a real party animal
04:26:59 <vdamewood> That's the number of letters from C to Z.
04:27:59 <geist> yah
04:29:18 <bcos> Don't forget that half of the "boot managers" rewrite the partition table anyway
04:30:12 <bcos> ..e.g. you select an OS to boot, it sets the partition table for that OS, then boots the OS (essentially, 1234 primary partitions where only 4 are enabled at a time)
04:30:59 <geist> yah the bad old days of MSFT OSes being very picky about what slot they were on what drive
04:31:16 <geist> you were always having to tiptoe around stupid requirements when installing more than one os
04:31:29 <geist> which they basically pretended didn't exist
05:45:22 <aalm> .theo
05:45:22 <glenda> Doesn't that send shivers down your spine?
05:52:47 <CompanionCube> geist: at least we have GPT now
05:53:57 <CompanionCube> and UEFI, for better/worse (though this part's on the better side)
06:05:03 <sortie> Good evening
06:06:59 <klange> Hi.
06:11:07 <geist> yah
06:13:37 <CompanionCube> 128 partitions is enough for anyone \s
06:19:21 <klange> sortie: what are you up to?
06:21:23 <sortie> klange: Ah process groups
06:21:47 <sortie> klange: Ran into a strange case where I couldn't put a process in a process group if the process group leader was a zombie process
06:22:03 <klange> braaains
06:22:30 <klange> i have a desktop again
06:22:47 <klange> and a file browser that isn't a joke
06:22:50 <sortie> Yeah I saw your screenshot
06:22:52 <sortie> Looking good!
06:22:55 <geist> braaaaains
06:23:28 <Kazinsal> fatal: read() returned ENOBRAINS
06:24:35 <klange> Tasks: 123 total, 3 running, 118 sleeping, 0 stopped, 2 hunger for brains
06:24:44 <geist> oh that's right i was goingto try to create too many paritions in dos and see what happens
06:30:00 <sortie> I kinda want to write a bunch of test infrastructure for my OS
06:30:10 <sortie> I really like the commit queue concept we use at work, where a commit is only merged to master if it passes a lot of strict test across lots of bots
06:30:17 <sortie> (rather than detecting faulty commits after the fact)
06:30:22 <geist> btw, the answer is indeed, you can create C: - Z:
06:30:25 <geist> and thats where it stop
06:31:10 <mischief> sortie: pretty standard practice
06:31:33 <Mutabah> sortie: That's how the rust compiler works, only bors (a bot) can push to master
06:31:51 <mischief> we had a bespoke test harness at my last job that ran the disk image in qemu in jenkins for every pr
06:31:53 <sortie> mischief: Indeed -- but it's been very worthwhile for us to make the switch
06:32:11 <mischief> quite a painful build process but it did work
06:32:24 <klange> I got my CI builds running again, so I could install qemu on that infrastructure and run a test suite...
06:32:26 <sortie> mischief: The cool thing about my OS is that I have a working sshd port. One of these years I'll get all of that fully merged. That'll open a lot of testing oppprtunities.
06:32:47 <Mutabah> sortie: openssh or dropbear?
06:32:53 <mischief> sortie: yeah, thats what we used
06:33:06 <sortie> In my family we all use angry canadian ssh
06:33:17 <mischief> sortie: the test harness injected an ssh key, then ran a series of commands over ssh to check for basic stuff and some regressions
06:33:48 <Mutabah> That's the lazy way :)
06:34:01 <sortie> I can just spawn a VM of my OS, then ssh into it and control it. Run tests to see if it's self-hosting. Test if release N can upgrade to the latest dev release by binary upgrade, and source upgrade.
06:34:03 <Mutabah> Real tests inject keystrokes and compare the screen content :)
06:34:20 <sortie> Test if the ports that build natively continue to build natively
06:34:26 <mischief> Mutabah: .....
06:34:28 <klange> I have a thing set up so I can do a reverse shell to the host.
06:34:29 <mischief> .theo
06:34:29 <glenda> Your emails only contain opinions.
06:34:35 <sortie> Test if unattended installation works. Run the standard unit tests.
06:34:56 <sortie> I can even spawn a recursive qemu VM inside my OS VM and run some (slow) tests in there.
06:34:57 <Mutabah> mischief: ok, I lie, I check the debug output on the serial port
06:35:02 <geist> ah yes. and i was right. DOS only lets you create a single primary partition
06:35:08 <geist> all subsequent ones must be extended
06:35:09 <sortie> To check e.g. if the natively built OS even works
06:35:36 <sortie> klange: Yeah this stuff can also be done with a shell over the serial line
06:35:54 <sortie> Oh you mean that you can get a shell of your Linux while on your OS?
06:36:14 <sortie> But yeah I work full time in testing, and I kinda want to build a lot of cool stuff for my OS
06:36:18 <mischief> we required ssh (since it was a linux server distro) so if ssh ever broke we just declared it dead.
06:36:53 <klange> no I can get a toaru shell over a network socket through a server running on the Linux host (though I can do the opposite too with my old busted telnet client?)
06:37:05 <mischief> in hindsight something like expect might have been better.
06:37:25 <klange> has the benefit of not needing to forward anything to the guest
06:39:15 <sortie> Nice
06:39:39 <klange> it's also a lot faster than emulated serial
06:40:09 <mischief> oh yeah
06:40:24 <mischief> we even implement the perl TAP format :)
06:40:31 <mischief> which jenkins has a plugin for
06:40:31 <sortie> Networking makes so much possible
06:40:31 <sortie> Yeah ^^ @ emulated serial slowness
06:41:08 <klange> I got annoyed with my editor being slow (and it not being my fault)
06:42:01 <mischief> i wish valgrind could tell you WHICH stack variable was uninitialized
06:42:27 <mischief> or at least give me more information -_-
06:42:51 <klange> you can run this totally safe script, preferrably in an xterm: `bash <(curl -s https://toaruos.org/run.sh)`
06:42:58 <klange> and get a toaru shell
06:55:13 * geist gets a little bit Genghis Khan
06:57:08 <mrvn> mischief: DWARF certainly has the info for that
06:59:31 <mischief> now i have a different problem -_-
08:15:39 <Sjors> klange: what's the nc -l 8090 for?
08:17:01 <klange> Instead of the host connecting to the guest, the guest connects to the host for the shell.
08:17:39 <klange> 8090 was just randomly chosen.
08:27:21 <mrvn> klange: by roll of a fair dice?
08:28:43 <klange> I wanted to have it pick an unusued port, but the logistics of doing that and communicating it to the guest are annoying.
08:36:00 <mischief> qemu fwcfg :-D
08:36:02 <aalm> 8090 is almost as good as 9090, not bad choice in comparison to the dirty plumbing you avoided w/it:]
10:12:47 <mrvn> I frequently use 1234
10:13:32 <klange> 6969 was my historic goto because an organization I was a member of had the registration for it
10:14:01 <klange> check your port descriptions for 'acmsoda' - the UIUC ACM student chapter registered that one for the protocol to communicate with our vending machines.
10:14:17 <lkurusa> woow
10:14:39 <klange> If you had the opportunity to use the Palm webOS dev tools, you may also notice they used 6969 for a daemon.
10:15:02 <mrvn> not in my etc/services
10:15:07 <klange> Because several of my friends went to work on webOS at Palm and took the 'nice' port number with them.
10:15:33 <klange> https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=6969
10:19:19 <lkurusa> is there an RFC for the 'acmsoda' protocol? :-)
10:21:14 <geist> 9876 is mine
10:24:41 <geist> klange: you know the 6969 thing was my choosing right?
10:24:52 <geist> I wrote novacom/novacomd, and there was a set of ports for that: https://github.com/openwebos/novacomd/blob/master/include/novacom.h#L29
10:25:29 <geist> I dont remember anyone suggesting it, may have just independently come up with the same thing
10:26:51 <klange> Really? I was assured by Palm engineers it was from us. Our assignment goes back to the 90s.
10:27:25 <geist> dont think so, unless someone suggested it to me
10:30:18 <klange> Well you were there concurrently with a lot of our guys, so it's still possible... but man I've been giving that story out for years as fact, I'm a bit red in the face now.
10:30:37 <geist> yah it's possible
10:31:34 <geist> those were the two main things i did at palm: bootie the bootloader (based on LK) and novacom/novacomd
10:54:35 <grange_c> [x86] If my kernel is mapped in each address space, is there any inconvenient I can't think of to mark its pages as "global"?
10:55:26 <Mutabah> that's the idea of the global bit
10:55:33 <Mutabah> to be marked on pages that are in every processs
10:55:50 <Mutabah> (so they don't get flushed from the TLB when changing cr3)
10:59:19 <grange_c> Yeah that's what i understood. No edge cases or anything i should pay attention of? I can't think of one, but I can't think of everything either.
11:09:17 * grange_c "
11:15:35 <mrvn> grange_c: if you mark them as global you have spectre/meltdown security bugs.
11:16:51 <mrvn> .oO(Another reason to work on microkernels. A natural protection against those)
11:16:54 <grange_c> Yeah I thought about that, I should definitely move the kernel in a different address space
11:18:30 <mrvn> My current plan is to have .text, .rodata mapped global but .data and .bss in each drivers address space.
11:31:04 <grange_c> Looks like a good idea
12:52:35 <mrvn> *grrr* the serial device stops working when the kernel crashes even though there are still bytes in the FIFO. So I don't see the last message.
01:09:55 <grange_c> When the kernel is idling, and you want to save power consumption (#savetheplanet), `HLT` is the way to go?
01:35:00 <clever> grange_c: i believe there are multiple "c-states", each with lower power usage and a longer delay at leaving it, and i think hlt is one of fastest
01:48:53 <mrvn> c-states is an x86 thing but other cpus have something similar.
01:49:26 <mrvn> Same for HLT, ARM has WFE/WFI wait for event/interrupt.
01:49:34 <clever> i'm not sure of the name, but android does something similar, where it entirely stops the cpu, including all timers
01:49:53 <clever> and only certain specially registered timers or hardware interupts can bring it out of that coma like state
01:50:13 <mrvn> You only want to enter sleep states when the cpu will be asleep for a while. waking up again takes time and work.
01:50:21 <clever> yep
01:50:41 <mrvn> And basically never sleep all cpus unless you realy want to power down.
01:51:55 * mrvn still hasn't manage to wake up the second core on his Helios4 board. Sleep states on ARM are a pain.
02:16:03 <mrvn> So there you are, building a space ship the size of a football field and you think: Hey, let's add an areodynamic fin. Because, you know, of all that air up there in space, right?
02:16:13 <mrvn> Aren't movies great?
04:29:37 <grange_c> Maybe it's a small petrol tank? :D
04:30:45 <grange_c> They already made the design of the space ship, built it, "whoops, we're lacking a bit of space for the tank" "let's add it there"
07:26:24 <SopaXorzTaker> https://en.wikipedia.org/w/index.php?title=IO.SYS&diff=865479654&oldid=770976472
07:26:36 <SopaXorzTaker> Hmm, someone vandalised the Wikipedia page of IO.SYS
07:26:40 <SopaXorzTaker> I wonder why :P